From be81b40879b405f5baff65c885cb564bdf2404ca Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Sun, 25 Oct 2009 17:54:49 +0100 Subject: Fix crash when joining a chat, GTK_WIDGET_VISIBLE is not NULL-safe --- src/empathy-chat-window.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c index e2d946c79..00ecc773e 100644 --- a/src/empathy-chat-window.c +++ b/src/empathy-chat-window.c @@ -349,8 +349,7 @@ chat_window_update (EmpathyChatWindow *window) menu = gtk_ui_manager_get_widget (priv->ui_manager, "/chats_menubar/menu_contact"); orig_submenu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (menu)); - if (!GTK_WIDGET_VISIBLE (orig_submenu)) - { + if (orig_submenu == NULL || !GTK_WIDGET_VISIBLE (orig_submenu)) { submenu = empathy_chat_get_contact_menu (priv->current_chat); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu), submenu); gtk_widget_show (menu); -- cgit v1.2.3