[gnome-photos] application: Fix a crash when stopping the miners



commit ace809c70a27177251c515018ddd898517d5045a
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Feb 23 16:56:23 2015 +0100

    application: Fix a crash when stopping the miners
    
    The list of running miners should not be freed when stopping them.
    Cancelling the GCancellable already causes the miner proxy to be
    unref'ed and removed from the list.
    
    Fallout from e895aea1b358271bf5f03d01afd9f17c24bbc701
    
    https://bugzilla.gnome.org/show_bug.cgi?id=745071

 src/photos-application.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index e74cc49..e4b5d31 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -1,7 +1,7 @@
 /*
  * Photos - access, organize and share your photos on GNOME
  * Copyright © 2014, 2015 Pranav Kant
- * Copyright © 2012, 2013, 2014 Red Hat, Inc.
+ * Copyright © 2012, 2013, 2014, 2015 Red Hat, Inc.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -186,13 +186,7 @@ photos_application_destroy (PhotosApplication *self)
   PhotosApplicationPrivate *priv = self->priv;
 
   priv->main_window = NULL;
-
-  if (priv->miners_running != NULL)
-    {
-      photos_application_stop_miners (self);
-      g_list_free_full (priv->miners_running, g_object_unref);
-      priv->miners_running = NULL;
-    }
+  photos_application_stop_miners (self);
 }
 
 
@@ -996,6 +990,12 @@ photos_application_dispose (GObject *object)
   PhotosApplication *self = PHOTOS_APPLICATION (object);
   PhotosApplicationPrivate *priv = self->priv;
 
+  if (priv->miners_running != NULL)
+    {
+      g_list_free_full (priv->miners_running, g_object_unref);
+      priv->miners_running = NULL;
+    }
+
   if (priv->miners != NULL)
     {
       g_list_free_full (priv->miners, g_object_unref);


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