[gnome-photos] application: Call gegl_exit later in the destruction sequence



commit ab694fecd31cbe80e47cbacffba38c736f683ff9
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Dec 16 12:39:09 2015 +0100

    application: Call gegl_exit later in the destruction sequence
    
    We are not supposed to use GEGL (and Babl) after calling gegl_exit.
    Therefore, we must call gegl_exit at the very end of the destruction
    sequence. Otherwise some operations might still be in flight and lead
    to CRITICALs and memory errors.

 src/photos-application.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index 61a2cf1..a0c432d 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -1135,7 +1135,6 @@ photos_application_shutdown (GApplication *application)
   g_assert (refresh_miner_ids_size == 0);
 
   g_clear_pointer (&priv->refresh_miner_ids, (GDestroyNotify) g_hash_table_unref);
-  gegl_exit ();
 
   G_APPLICATION_CLASS (photos_application_parent_class)->shutdown (application);
 }
@@ -1448,6 +1447,9 @@ photos_application_finalize (GObject *object)
 
   g_assert (self->priv->create_miners_count == 0);
 
+  if (!g_application_get_is_remote (G_APPLICATION (self)))
+    gegl_exit ();
+
   G_OBJECT_CLASS (photos_application_parent_class)->finalize (object);
 }
 


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