[empathy/mc5: 103/483] Ignore a log when the account it isn't found



commit 9309c89a6ce064223dc2879d5b61baf69472a334
Author: Sjoerd Simons <sjoerd simons collabora co uk>
Date:   Thu Jul 16 15:38:46 2009 +0100

    Ignore a log when the account it isn't found

 libempathy/empathy-log-store-empathy.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/libempathy/empathy-log-store-empathy.c b/libempathy/empathy-log-store-empathy.c
index 6fedf12..56dc70f 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 ();
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]