aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
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
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')
-rw-r--r--libempathy/empathy-log-manager.c12
-rw-r--r--libempathy/empathy-tp-contact-list.c3
2 files changed, 9 insertions, 6 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);
diff --git a/libempathy/empathy-tp-contact-list.c b/libempathy/empathy-tp-contact-list.c
index 760ee013b..7668057e7 100644
--- a/libempathy/empathy-tp-contact-list.c
+++ b/libempathy/empathy-tp-contact-list.c
@@ -1845,7 +1845,8 @@ tp_contact_list_status_changed_cb (MissionControl *mc,
account = mc_account_lookup (unique_name);
if (status != TP_CONN_STATUS_DISCONNECTED ||
- !gossip_account_equal (account, priv->account)) {
+ !gossip_account_equal (account, priv->account) ||
+ !priv->tp_conn) {
g_object_unref (account);
return;
}