# HG changeset patch # User Sadrul Habib Chowdhury # Date 1188581017 0 # Node ID 4ce45c227f1093b0a85405cd4557bec09fe6baa2 # Parent 6575ec8e1a97dc1e3e67d8e57dcf33cc81a22a7a Do not crash on hidden conversations. diff -r 6575ec8e1a97 -r 4ce45c227f10 pidgin/plugins/notify.c --- a/pidgin/plugins/notify.c Wed Aug 29 23:43:36 2007 +0000 +++ b/pidgin/plugins/notify.c Fri Aug 31 17:23:37 2007 +0000 @@ -167,7 +167,7 @@ gboolean has_focus; PidginWindow *purplewin = NULL; - if (conv == NULL) + if (conv == NULL || PIDGIN_CONVERSATION(conv) == NULL) return 0; /* We want to remove the notifications, but not reset the counter */ @@ -224,6 +224,8 @@ PidginWindow *purplewin = NULL; g_return_if_fail(conv != NULL); + if (PIDGIN_CONVERSATION(conv) == NULL) + return; purplewin = PIDGIN_CONVERSATION(conv)->win; active_conv = pidgin_conv_window_get_active_conversation(purplewin); @@ -417,10 +419,14 @@ deleting_conv(PurpleConversation *conv) { PidginWindow *purplewin = NULL; + PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv); + + if (gtkconv == NULL) + return; detach_signals(conv); - purplewin = PIDGIN_CONVERSATION(conv)->win; + purplewin = gtkconv->win; handle_urgent(purplewin, FALSE); purple_conversation_set_data(conv, "notify-message-count", GINT_TO_POINTER(0));