/pidgin/main: f7b7a6c58ad3: Fix a loop when closing conversation...

David Michael fedora.dm0 at gmail.com
Wed Aug 1 02:29:08 EDT 2012


Changeset: f7b7a6c58ad3530a43f1b07a4d7128a96e9e9adb
Author:	 David Michael <fedora.dm0 at gmail.com>
Date:	 2012-07-29 01:21 -0400
Branch:	 release-2.x.y
URL: http://hg.pidgin.im/pidgin/main/rev/f7b7a6c58ad3

Description:

Fix a loop when closing conversation windows with custom conversations.

Fixes #15148.

Committer: Elliott Sales de Andrade <qulogic at pidgin.im>

diffstat:

 pidgin/gtkconv.c |  20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)

diffs (37 lines):

diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -9380,6 +9380,17 @@ pidgin_conv_window_new()
 void
 pidgin_conv_window_destroy(PidginWindow *win)
 {
+	PidginConversation *gtkconv;
+	GList *iter;
+
+	if (win->gtkconvs) {
+		for (iter = win->gtkconvs; iter != NULL; iter = iter->next) {
+			gtkconv = iter->data;
+			close_conv_cb(NULL, gtkconv);
+		}
+		return;
+	}
+
 	purple_prefs_disconnect_by_handle(win);
 	window_list = g_list_remove(window_list, win);
 
@@ -9387,15 +9398,6 @@ pidgin_conv_window_destroy(PidginWindow 
 	if (win->dialogs.search)
 		gtk_widget_destroy(win->dialogs.search);
 
-	if (win->gtkconvs) {
-		while (win->gtkconvs) {
-			gboolean last = (win->gtkconvs->next == NULL);
-			close_conv_cb(NULL, win->gtkconvs->data);
-			if (last)
-				break;
-		}
-		return;
-	}
 	gtk_widget_destroy(win->window);
 
 	g_object_unref(G_OBJECT(win->menu.item_factory));



More information about the Commits mailing list