[nautilus] view: don't NULL the slot until the end of destroy



commit 2234c4abbe52a4f53c8a209c7736f789ad6b9bce
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Sep 18 12:47:16 2012 -0400

    view: don't NULL the slot until the end of destroy
    
    Since some of the calls we make (e.g. nautilus_view_stop_loading) might
    access the slot, causing a segfault.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=684308

 src/nautilus-view.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index d647f96..f51d916 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -2736,10 +2736,6 @@ nautilus_view_destroy (GtkWidget *object)
 	disconnect_model_handlers (view);
 
 	nautilus_view_unmerge_menus (view);
-	
-	/* We don't own the window, so no unref */
-	view->details->slot = NULL;
-	
 	nautilus_view_stop_loading (view);
 
 	for (node = view->details->scripts_directory_list; node != NULL; node = next) {
@@ -2785,6 +2781,9 @@ nautilus_view_destroy (GtkWidget *object)
 		view->details->directory_as_file = NULL;
 	}
 
+	/* We don't own the slot, so no unref */
+	view->details->slot = NULL;
+
 	GTK_WIDGET_CLASS (nautilus_view_parent_class)->destroy (object);
 }
 



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