aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--libempathy-gtk/gossip-chat.c1
-rw-r--r--libempathy/empathy-log-manager.c12
-rw-r--r--libempathy/empathy-tp-contact-list.c3
4 files changed, 16 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 24f684f83..ff37310d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;
}