changeset 8218:4beaf6b35483

[gaim-migrate @ 8941] prevent a possible crash when passing NULL as a protocol ID to gaim_gtk_protocol_option_menu_new(). committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sat, 07 Feb 2004 23:24:31 +0000
parents 423453c1cf2b
children 862dc2839646
files src/gtkutils.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkutils.c	Sat Feb 07 17:40:57 2004 +0000
+++ b/src/gtkutils.c	Sat Feb 07 23:24:31 2004 +0000
@@ -723,7 +723,7 @@
 		gtk_widget_show(item);
 		gaim_set_accessible_label (item, label);
 
-		if (!strcmp(plugin->info->id, id))
+		if (id != NULL && !strcmp(plugin->info->id, id))
 			selected_index = i;
 	}
 
@@ -1563,7 +1563,7 @@
 	gdk_window_get_origin (widget->window, x, y);
 	gtk_tree_view_get_cursor (tv, &path, &col);
 	gtk_tree_view_get_cell_area (tv, path, col, &rect);
-	
+
 	*x += rect.x+rect.width;
 	*y += rect.y+rect.height+ythickness;
 	gaim_gtk_menu_position_func (menu, x, y, push_in, data);