From 26c5dbdb15ffaba1bac960966617872d557a0f34 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Wed, 23 Apr 2008 13:58:10 +0000 Subject: Make sure we don't assume Text channel's handle_type is != NONE. svn path=/trunk/; revision=1032 --- src/empathy-chat-window.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/empathy-chat-window.c') diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c index 09a0e4589..4125f9743 100644 --- a/src/empathy-chat-window.c +++ b/src/empathy-chat-window.c @@ -34,6 +34,7 @@ #include #include +#include #include #include @@ -470,17 +471,18 @@ chat_window_clear_activate_cb (GtkWidget *menuitem, static const gchar * chat_get_window_id_for_geometry (EmpathyChat *chat) { - gboolean separate_windows; + const gchar *res = NULL; + gboolean separate_windows; empathy_conf_get_bool (empathy_conf_get (), EMPATHY_PREFS_UI_SEPARATE_CHAT_WINDOWS, &separate_windows); if (separate_windows) { - return empathy_chat_get_id (chat); - } else { - return "chat-window"; + res = empathy_chat_get_id (chat); } + + return res ? res : "chat-window"; } static gboolean @@ -1455,7 +1457,7 @@ empathy_chat_window_find_chat (McAccount *account, chat = ll->data; if (empathy_account_equal (account, empathy_chat_get_account (chat)) && - strcmp (id, empathy_chat_get_id (chat)) == 0) { + !tp_strdiff (id, empathy_chat_get_id (chat))) { return chat; } } -- cgit v1.2.3