]> Pileus Git - grits/blobdiff - src/grits-test.c
Improve shutdown code
[grits] / src / grits-test.c
index 8f46185931a511bc3c62a670434ce0d9449699ca..67e299d887d4376f50d0aa85d5203317559ebfcf 100644 (file)
@@ -31,13 +31,13 @@ GritsViewer  *viewer  = NULL;
  *************/
 static gboolean grits_shutdown(GtkWidget *window)
 {
+       static gboolean shutdown = FALSE;
+       if (shutdown) return TRUE;
+       shutdown = TRUE;
+
        grits_plugins_free(plugins);
        g_object_unref(prefs);
        gtk_widget_destroy(window);
-
-       while (gtk_events_pending())
-                 gtk_main_iteration();
-
        gtk_main_quit();
        return TRUE;
 }