[anjuta] git: Fix assertion when running g_signal_handlers_disconnect on already destroyed widget.



commit 158f724c0f3fe3d60efc86fa2fdbf3a7dd091fe2
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date:   Sun Nov 18 21:01:07 2012 +0100

    git: Fix assertion when running g_signal_handlers_disconnect on already destroyed widget.
    
    The call to anjuta_shell_remove_widget() will destroy the dock_window widget so the
    subsequent g_signal_handlers_disconnect_by_func() is passed an invalid object.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=688602

 plugins/git/plugin.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/plugins/git/plugin.c b/plugins/git/plugin.c
index 26296da..4ebb856 100644
--- a/plugins/git/plugin.c
+++ b/plugins/git/plugin.c
@@ -875,9 +875,6 @@ git_deactivate_plugin (AnjutaPlugin *plugin)
 	anjuta_plugin_remove_watch (plugin, git_plugin->editor_watch_id,
 								TRUE);
 
-	anjuta_shell_remove_widget (plugin->shell, git_plugin->command_bar_window, NULL);
-	anjuta_shell_remove_widget (plugin->shell, git_plugin->dock_window, NULL);
-
 	g_signal_handlers_disconnect_by_func (G_OBJECT (git_plugin->dock_window),
 	                                      G_CALLBACK (on_dock_window_mapped),
 	                                      plugin);
@@ -889,6 +886,9 @@ git_deactivate_plugin (AnjutaPlugin *plugin)
 	g_signal_handlers_disconnect_by_func (G_OBJECT (plugin->shell),
 	                                      G_CALLBACK (on_shell_exiting),
 	                                      git_plugin);
+	
+	anjuta_shell_remove_widget (plugin->shell, git_plugin->command_bar_window, NULL);
+	anjuta_shell_remove_widget (plugin->shell, git_plugin->dock_window, NULL);
 
 	g_object_unref (git_plugin->local_branch_list_command);
 	g_object_unref (git_plugin->remote_branch_list_command);



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