From 4e0778f0e0033d922d2fd0a925df9c12865fb832 Mon Sep 17 00:00:00 2001 From: Mike Ruprecht Date: Tue, 31 Aug 2010 21:35:11 -0500 Subject: Fix crash in log_manager_got_chats_cb. When the log window is opened through the contact list with the previous conversations menu item, Empathy crashes due to there not being a currently selected account when log_manager_got_chats_cb is called. This patch adds a condition to check if there is a selected account before using it. --- libempathy-gtk/empathy-log-window.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c index 5e6709938..aa0370b94 100644 --- a/libempathy-gtk/empathy-log-window.c +++ b/libempathy-gtk/empathy-log-window.c @@ -821,7 +821,8 @@ log_manager_got_chats_cb (GObject *manager, COL_CHAT_IS_CHATROOM, hit->is_chatroom, -1); - if (!tp_strdiff (tp_proxy_get_object_path (hit->account), + if (window->selected_account != NULL && + !tp_strdiff (tp_proxy_get_object_path (hit->account), tp_proxy_get_object_path (window->selected_account))) select_account = TRUE; -- cgit v1.2.3