aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-log-manager.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2007-06-03 02:03:38 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-06-03 02:03:38 +0800
commit857bee6e95337956c05b6ac880063dbe1b858545 (patch)
treea0c916f1c7a9f018fd0dbfe619d0164fff5b3e62 /libempathy/empathy-log-manager.c
parent9dde03a4b7e7398df502b05d18d1010b4ee88cab (diff)
downloadgsoc2013-empathy-857bee6e95337956c05b6ac880063dbe1b858545.tar
gsoc2013-empathy-857bee6e95337956c05b6ac880063dbe1b858545.tar.gz
gsoc2013-empathy-857bee6e95337956c05b6ac880063dbe1b858545.tar.bz2
gsoc2013-empathy-857bee6e95337956c05b6ac880063dbe1b858545.tar.lz
gsoc2013-empathy-857bee6e95337956c05b6ac880063dbe1b858545.tar.xz
gsoc2013-empathy-857bee6e95337956c05b6ac880063dbe1b858545.tar.zst
gsoc2013-empathy-857bee6e95337956c05b6ac880063dbe1b858545.zip
Fix crash when there is no log available for a chat. Fix a crash when
2007-06-02 Xavier Claessens <xclaesse@gmail.com> * libempathy/empathy-log-manager.c: Fix crash when there is no log available for a chat. * libempathy/empathy-tp-contact-list.c: Fix a crash when destroy signal is emitted before StatusChanged. svn path=/trunk/; revision=115
Diffstat (limited to 'libempathy/empathy-log-manager.c')
-rw-r--r--libempathy/empathy-log-manager.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/libempathy/empathy-log-manager.c b/libempathy/empathy-log-manager.c
index 68e20c8da..ca5297ea7 100644
--- a/libempathy/empathy-log-manager.c
+++ b/libempathy/empathy-log-manager.c
@@ -331,7 +331,7 @@ empathy_log_manager_get_last_messages (EmpathyLogManager *manager,
McAccount *account,
const gchar *chat_id)
{
- GList *messages;
+ GList *messages = NULL;
GList *dates;
GList *l;
@@ -342,10 +342,12 @@ empathy_log_manager_get_last_messages (EmpathyLogManager *manager,
dates = empathy_log_manager_get_dates (manager, account, chat_id);
l = g_list_last (dates);
- messages = empathy_log_manager_get_messages_for_date (manager,
- account,
- chat_id,
- l->data);
+ if (l) {
+ messages = empathy_log_manager_get_messages_for_date (manager,
+ account,
+ chat_id,
+ l->data);
+ }
g_list_foreach (dates, (GFunc) g_free, NULL);
g_list_free (dates);