summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2012-11-20 15:25:38 -0500
committerTingPing <tingping@tingping.se>2012-11-20 15:25:38 -0500
commita1c8fd998cca80423b0a365e3dff134b21fa2cb8 (patch)
treec019cf8720e3ed1b5c3f92b877662e488a09869a
parentecde599fd456adc83f42cc842ac87cbec94b7610 (diff)
ensure menu exists
-rw-r--r--src/fe-gtk/plugin-tray.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fe-gtk/plugin-tray.c b/src/fe-gtk/plugin-tray.c
index 94510e4d..5c0d02ce 100644
--- a/src/fe-gtk/plugin-tray.c
+++ b/src/fe-gtk/plugin-tray.c
@@ -540,7 +540,10 @@ tray_menu_cb (GtkWidget *widget, guint button, guint time, gpointer userdata)
 	hexchat_set_context (ph, hexchat_find_context (ph, NULL, NULL));
 
 	/* close any old menu */
-	tray_menu_destroy (menu, NULL);
+	if (G_IS_OBJECT (menu))
+	{
+		tray_menu_destroy (menu, NULL);
+	}
 
 	menu = gtk_menu_new ();
 	/*gtk_menu_set_screen (GTK_MENU (menu), gtk_widget_get_screen (widget));*/