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



commit 4626ca9c85b4ebd714dce01b971d7724ce6ecbf0
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 f72ba26..014dd18 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 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
@@ -175,13 +175,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);
 }
 
 
@@ -971,6 +965,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]