changeset 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 c2cd559e034f
children 08964b4b2fe4
files pidgin/gtkutils.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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