cpw.qulogic.gtk3: db0d8c4f: Cleanup things in a slightly less (non-f...

qulogic at pidgin.im qulogic at pidgin.im
Tue Jul 28 01:57:36 EDT 2009


-----------------------------------------------------------------
Revision: db0d8c4fc36e4c1479c661ae5c3daeba28e4bb4c
Ancestor: 51758b2d93ec226b8afd58da39d63b8e268d1e38
Author: qulogic at pidgin.im
Date: 2009-07-28T01:52:46
Branch: im.pidgin.cpw.qulogic.gtk3
URL: http://d.pidgin.im/viewmtn/revision/info/db0d8c4fc36e4c1479c661ae5c3daeba28e4bb4c

Modified files:
        pidgin/gtkblist.c

ChangeLog: 

Cleanup things in a slightly less (non-fatal) error-producing way.

-------------- next part --------------
============================================================
--- pidgin/gtkblist.c	dccb0717d68d3fc42fc904f4925f1018ed8fe558
+++ pidgin/gtkblist.c	ad40fe078c8c86574dd6666f198553e86d775659
@@ -8204,9 +8204,11 @@ pidgin_blist_update_accounts_menu(void)
 		return;
 
 	/* Clear the old menu */
-	gtk_ui_manager_remove_ui(gtkblist->ui, accounts_merge_id);
-	gtk_ui_manager_remove_action_group(gtkblist->ui, accounts_action_group);
-	g_object_unref(G_OBJECT(accounts_action_group));
+	if (accounts_action_group) {
+		gtk_ui_manager_remove_ui(gtkblist->ui, accounts_merge_id);
+		gtk_ui_manager_remove_action_group(gtkblist->ui, accounts_action_group);
+		g_object_unref(G_OBJECT(accounts_action_group));
+	}
 
 	accounts_action_group = gtk_action_group_new("Accounts");
 #ifdef ENABLE_NLS
@@ -8449,9 +8451,11 @@ pidgin_blist_update_plugin_actions(void)
 		return;
 
 	/* Clear the old menu */
-	gtk_ui_manager_remove_ui(gtkblist->ui, plugins_merge_id);
-	gtk_ui_manager_remove_action_group(gtkblist->ui, plugins_action_group);
-	g_object_unref(G_OBJECT(plugins_action_group));
+	if (plugins_action_group) {
+		gtk_ui_manager_remove_ui(gtkblist->ui, plugins_merge_id);
+		gtk_ui_manager_remove_action_group(gtkblist->ui, plugins_action_group);
+		g_object_unref(G_OBJECT(plugins_action_group));
+	}
 
 	plugins_action_group = gtk_action_group_new("Accounts");
 #ifdef ENABLE_NLS
@@ -8585,8 +8589,11 @@ pidgin_blist_update_sort_methods(void)
 		return;
 
 	/* Clear the old menu */
-	gtk_ui_manager_remove_ui(gtkblist->ui, sort_merge_id);
-	gtk_ui_manager_remove_action_group(gtkblist->ui, sort_action_group);
+	if (sort_action_group) {
+		gtk_ui_manager_remove_ui(gtkblist->ui, sort_merge_id);
+		gtk_ui_manager_remove_action_group(gtkblist->ui, sort_action_group);
+		g_object_unref(G_OBJECT(sort_action_group));
+	}
 
 	sort_action_group = gtk_action_group_new("SortMethods");
 #ifdef ENABLE_NLS


More information about the Commits mailing list