Avoid GApplication being released twice on gtk_application_remove_window() calls

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
This commit is contained in:
Claudio Saavedra 2011-06-21 00:29:45 +03:00
parent d2b6480ba2
commit c3b7590c77

View 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