[empathy: 1/2] Fix crash in log_manager_got_chats_cb.



commit 4e0778f0e0033d922d2fd0a925df9c12865fb832
Author: Mike Ruprecht <mike ruprecht collabora co uk>
Date:   Tue Aug 31 21:35:11 2010 -0500

    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 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index 5e67099..aa0370b 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;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]