[nautilus] Clear the list model in _finalize() instead of _dispose()



commit bfe278cbf84a441a951d48dc528f20226127e1f3
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Sep 17 19:25:54 2010 +0200

    Clear the list model in _finalize() instead of _dispose()
    
    We have the only reference to the model anyway. This fixes a crash when
    _end_loading() is called for a windiow before it finished loading.

 src/file-manager/fm-list-view.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c
index 9980dab..1f235de 100644
--- a/src/file-manager/fm-list-view.c
+++ b/src/file-manager/fm-list-view.c
@@ -2812,12 +2812,6 @@ fm_list_view_dispose (GObject *object)
 
 	list_view = FM_LIST_VIEW (object);
 
-	if (list_view->details->model) {
-		stop_cell_editing (list_view);
-		g_object_unref (list_view->details->model);
-		list_view->details->model = NULL;
-	}
-
 	if (list_view->details->drag_dest) {
 		g_object_unref (list_view->details->drag_dest);
 		list_view->details->drag_dest = NULL;
@@ -2844,6 +2838,12 @@ fm_list_view_finalize (GObject *object)
 
 	list_view = FM_LIST_VIEW (object);
 
+	if (list_view->details->model) {
+		stop_cell_editing (list_view);
+		g_object_unref (list_view->details->model);
+		list_view->details->model = NULL;
+	}
+	
 	g_free (list_view->details->original_name);
 	list_view->details->original_name = NULL;
 	



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