# HG changeset patch # User Richard Laager # Date 1189900153 0 # Node ID 2fefc7eaa36fa04a72f3c76c642571e3add42d70 # Parent b4708680299e8e15e8dded72e6dd63a43e112d84# Parent 8c33d2e73060683ec155f4d54ce65ff1791001f8 merge of '22f6ff41c9fffdd5267c9c96f8208a6071443e62' and '9a8e007dbbbdee9fe816195d04b6372d67f4450b' diff -r b4708680299e -r 2fefc7eaa36f pidgin/gtkconv.c --- a/pidgin/gtkconv.c Sat Sep 15 23:40:53 2007 +0000 +++ b/pidgin/gtkconv.c Sat Sep 15 23:49:13 2007 +0000 @@ -219,7 +219,7 @@ } static gboolean -close_conv_cb(GtkWidget *w, GdkEventButton *event, PidginConversation *gtkconv) +close_conv_cb(GtkWidget *w, GdkEventButton *dontuse, PidginConversation *gtkconv) { /* We are going to destroy the conversations immediately only if the 'close immediately' * preference is selected. Otherwise, close the conversation after a reasonable timeout @@ -8833,15 +8833,10 @@ if (win->gtkconvs) { while (win->gtkconvs) { - GList *nextgtk = win->gtkconvs->next; - PidginConversation *gtkconv = win->gtkconvs->data; - GList *nextcore = gtkconv->convs->next; - PurpleConversation *conv = gtkconv->convs->data; - purple_conversation_destroy(conv); - if (!nextgtk && !nextcore) - /* we'll end up invoking ourselves when we destroy our last child */ - /* so don't destroy ourselves right now */ - return; + gboolean last = (win->gtkconvs->next == NULL); + close_conv_cb(NULL, NULL, win->gtkconvs->data); + if (last) + break; } return; }