From: <sa...@us...> - 2006-11-18 05:30:58
|
Revision: 17774 http://svn.sourceforge.net/gaim/?rev=17774&view=rev Author: sadrul Date: 2006-11-17 21:30:57 -0800 (Fri, 17 Nov 2006) Log Message: ----------- The data for "plugin_action" is set with a destructor function. So freeing it twice would cause a crash. The reason it's not crashing is, the children of the container are not the menuitems, but GtkAccelLabel (or some such thing). So all we are doing is freeing null. Also, when the menu is destroyed, all the menuitems are also destroyed anyway. So get rid of the unrequired loop. Also, isdigit expects a character, not a string. Modified Paths: -------------- trunk/gtk/gtkblist.c trunk/gtk/gtkmain.c Modified: trunk/gtk/gtkblist.c =================================================================== --- trunk/gtk/gtkblist.c 2006-11-18 05:25:31 UTC (rev 17773) +++ trunk/gtk/gtkblist.c 2006-11-18 05:30:57 UTC (rev 17774) @@ -6115,20 +6115,7 @@ /* Remove old plugin action submenus from the Tools menu */ for (l = plugin_submenus; l; l = l->next) - { - GList *menuitems; - - submenu = l->data; - - while ((menuitems = gtk_container_get_children(GTK_CONTAINER(submenu))) != NULL) - { - menuitem = menuitems->data; - g_free(g_object_get_data(G_OBJECT(menuitem), "plugin_action")); - gtk_widget_destroy(menuitem); - } - - gtk_widget_destroy(GTK_WIDGET(submenu)); - } + gtk_widget_destroy(GTK_WIDGET(l->data)); g_list_free(plugin_submenus); plugin_submenus = NULL; Modified: trunk/gtk/gtkmain.c =================================================================== --- trunk/gtk/gtkmain.c 2006-11-18 05:25:31 UTC (rev 17773) +++ trunk/gtk/gtkmain.c 2006-11-18 05:30:57 UTC (rev 17774) @@ -735,7 +735,7 @@ for (accounts = gaim_accounts_get_all(); accounts != NULL; accounts = accounts->next) { GaimAccount *account = accounts->data; if (!strcmp(gaim_account_get_protocol_id(account), "prpl-oscar")) { - if (isdigit(gaim_account_get_username(account))) + if (isdigit(*gaim_account_get_username(account))) gaim_account_set_protocol_id(account, "prpl-icq"); else gaim_account_set_protocol_id(account, "prpl-aim"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |