[gedit] app: shutdown metadata-manager after GTK+



commit 85e47faa80da1055a32228a7dd9f1a23e2843da2
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Sep 12 23:16:55 2014 +0200

    app: shutdown metadata-manager after GTK+
    
    This avoids a crash when GTK+ still holds a reference to a GeditDocument
    for the clipboard.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736591

 gedit/gedit-app.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
index ef77587..643667d 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
@@ -1186,13 +1186,17 @@ gedit_app_shutdown (GApplication *app)
        save_page_setup (GEDIT_APP (app));
        save_print_settings (GEDIT_APP (app));
 
+       /* GTK+ can still hold references to some gedit objects, for example
+        * GeditDocument for the clipboard. So the metadata-manager should be
+        * shutdown after.
+        */
+       G_APPLICATION_CLASS (gedit_app_parent_class)->shutdown (app);
+
 #ifndef ENABLE_GVFS_METADATA
        gedit_metadata_manager_shutdown ();
 #endif
 
        gedit_dirs_shutdown ();
-
-       G_APPLICATION_CLASS (gedit_app_parent_class)->shutdown (app);
 }
 
 static gboolean


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]