diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2007-06-03 02:03:38 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2007-06-03 02:03:38 +0800 |
commit | 857bee6e95337956c05b6ac880063dbe1b858545 (patch) | |
tree | a0c916f1c7a9f018fd0dbfe619d0164fff5b3e62 | |
parent | 9dde03a4b7e7398df502b05d18d1010b4ee88cab (diff) | |
download | gsoc2013-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
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | libempathy-gtk/gossip-chat.c | 1 | ||||
-rw-r--r-- | libempathy/empathy-log-manager.c | 12 | ||||
-rw-r--r-- | libempathy/empathy-tp-contact-list.c | 3 |
4 files changed, 16 insertions, 7 deletions
@@ -1,5 +1,12 @@ 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. + +2007-06-02 Xavier Claessens <xclaesse@gmail.com> + * libempathy-gtk/gossip-group-chat.c: * libempathy-gtk/gossip-private-chat.c: * libempathy-gtk/gossip-chat.c: diff --git a/libempathy-gtk/gossip-chat.c b/libempathy-gtk/gossip-chat.c index 677cdd258..37da0853c 100644 --- a/libempathy-gtk/gossip-chat.c +++ b/libempathy-gtk/gossip-chat.c @@ -1314,7 +1314,6 @@ gossip_chat_set_tp_chat (GossipChat *chat, priv->first_tp_chat = FALSE; } - g_signal_connect (tp_chat, "message-received", G_CALLBACK (chat_message_received_cb), chat); 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; } |