[patch] [bug 461789] fix order of action group removal



Hi;

attached patch (from bug
http://bugzilla.gnome.org/show_bug.cgi?id=461789 ) fixes a potential
crash when removing the action after its owning group has already been
removed from the UI manager, which potentially finalises it. Ok to
commit?

Regards,
	Christian
Index: src/nautilus-window.c
===================================================================
--- src/nautilus-window.c	(révision 13025)
+++ src/nautilus-window.c	(copie de travail)
@@ -1031,22 +1024,18 @@ real_load_view_as_menu (NautilusWindow *
 					  window->details->short_list_merge_id);
 		window->details->short_list_merge_id = 0;
 	}
-	if (window->details->view_as_action_group != NULL) {
-		gtk_ui_manager_remove_action_group (window->details->ui_manager,
-						    window->details->view_as_action_group);
-		window->details->view_as_action_group = NULL;
-	}
-
 	if (window->details->extra_viewer_merge_id != 0) {
 		gtk_ui_manager_remove_ui (window->details->ui_manager,
 					  window->details->extra_viewer_merge_id);
 		window->details->extra_viewer_merge_id = 0;
-	}
-	if (window->details->extra_viewer_radio_action != NULL) {
-		gtk_action_group_remove_action (window->details->view_as_action_group,
-						GTK_ACTION (window->details->extra_viewer_radio_action));
 		window->details->extra_viewer_radio_action = NULL;
 	}
+	if (window->details->view_as_action_group != NULL) {
+		gtk_ui_manager_remove_action_group (window->details->ui_manager,
+						    window->details->view_as_action_group);
+		window->details->view_as_action_group = NULL;
+	}
+
 	g_free (window->details->extra_viewer);
 	window->details->extra_viewer = NULL;
 	



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