Mercurial > pidgin.yaz
diff pidgin/gtkconv.c @ 18452:45865fb3f4f9
Do not crash if you delete an account with an open conversation.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sat, 07 Jul 2007 04:03:41 +0000 |
parents | 7f2c22c705a5 |
children | b91a29987d71 |
line wrap: on
line diff
--- a/pidgin/gtkconv.c Sat Jul 07 00:30:45 2007 +0000 +++ b/pidgin/gtkconv.c Sat Jul 07 04:03:41 2007 +0000 @@ -4857,8 +4857,14 @@ gtkconv->convs = g_list_remove(gtkconv->convs, conv); /* Don't destroy ourselves until all our convos are gone */ - if (gtkconv->convs) + if (gtkconv->convs) { + /* Make sure the destroyed conversation is not the active one */ + if (gtkconv->active_conv == conv) { + gtkconv->active_conv = gtkconv->convs->data; + purple_conversation_update(gtkconv->active_conv, PURPLE_CONV_UPDATE_FEATURES); + } return; + } pidgin_conv_window_remove_gtkconv(gtkconv->win, gtkconv);