aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy/empathy-log-store-empathy.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libempathy/empathy-log-store-empathy.c b/libempathy/empathy-log-store-empathy.c
index 6fedf121a..56dc70fa4 100644
--- a/libempathy/empathy-log-store-empathy.c
+++ b/libempathy/empathy-log-store-empathy.c
@@ -426,9 +426,15 @@ log_store_empathy_get_messages_for_file (EmpathyLogStore *self,
/* Get the account from the filename */
hit = log_store_empathy_search_hit_new (self, filename);
- account = g_object_ref (hit->account);
+
+ if (hit->account != NULL)
+ account = g_object_ref (hit->account);
+
empathy_log_manager_search_hit_free (hit);
+ if (hit->account == NULL)
+ return NULL;
+
/* Create parser. */
ctxt = xmlNewParserCtxt ();