diff pidgin/gtkutils.c @ 27057:fe1603ecf579

Avoid an assertion when nothing in dropdown is selected. This happens with an account filter on XMPP accounts and no XMPP accounts are connected, so there's nothing in the dropdown.
author Paul Aurich <paul@darkrain42.org>
date Sun, 24 May 2009 18:39:32 +0000
parents 89f613b16e2b
children 73c8e1964eef fb593c327870
line wrap: on
line diff
--- a/pidgin/gtkutils.c	Sat May 23 22:46:28 2009 +0000
+++ b/pidgin/gtkutils.c	Sun May 24 18:39:32 2009 +0000
@@ -525,7 +525,7 @@
 	GtkWidget *item = gtk_menu_get_active(GTK_MENU(menu));
 	if (p_item)
 		(*p_item) = item;
-	return g_object_get_data(G_OBJECT(item), "aop_per_item_data");
+	return item ? g_object_get_data(G_OBJECT(item), "aop_per_item_data") : NULL;
 }
 
 static void