]> Pileus Git - ~andy/gtk/commitdiff
Avoid GApplication being released twice on gtk_application_remove_window() calls
authorClaudio Saavedra <csaavedra@igalia.com>
Mon, 20 Jun 2011 21:29:45 +0000 (00:29 +0300)
committerClaudio Saavedra <csaavedra@igalia.com>
Mon, 20 Jun 2011 21:38:33 +0000 (00:38 +0300)
Removing the window from the window list before setting the
application to %NULL avoids gtk_application_remove_window() triggering
another call to gtk_application_window_removed(), which would release
the application a second time.

https://bugzilla.gnome.org/show_bug.cgi?id=653053

gtk/gtkapplication.c

index 496a010f4e02a37d729945ff6e5a81a2a3658483..c6db4e81266cb6704d5aff462626e193f91ed843 100644 (file)
@@ -191,8 +191,8 @@ gtk_application_window_removed (GtkApplication *application,
                                         application);
 
   g_application_release (G_APPLICATION (application));
-  gtk_window_set_application (window, NULL);
   priv->windows = g_list_remove (priv->windows, window);
+  gtk_window_set_application (window, NULL);
 }
 
 static void