From e7dc04d28ef1d38468888a17a3257282e8881d22 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 9 Dec 2007 23:03:45 +0000 Subject: [PATCH] check for null before adding menu; closes #496054. 2007-12-08 Matthias Clasen * src/menu.c (meta_window_menu_new): check for null before adding menu; closes #496054. svn path=/trunk/; revision=3465 --- ChangeLog | 5 +++++ src/menu.c | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d3d4c9f96..be7063647 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-12-08 Matthias Clasen + + * src/menu.c (meta_window_menu_new): check for null before adding + menu; closes #496054. + 2007-12-08 Thomas Thurman * src/keybindings.c (meta_display_process_key_event): Recur if the diff --git a/src/menu.c b/src/menu.c index 74740ee05..41f603dd4 100644 --- a/src/menu.c +++ b/src/menu.c @@ -474,10 +474,12 @@ meta_window_menu_new (MetaFrames *frames, g_free, FALSE, FALSE); } - - gtk_menu_shell_append (GTK_MENU_SHELL (menu->menu), mi); + if (mi) + { + gtk_menu_shell_append (GTK_MENU_SHELL (menu->menu), mi); - gtk_widget_show (mi); + gtk_widget_show (mi); + } } }