From 178ce417ee273a9e1f5ffd5e1df50e5120b4d466 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Sun, 17 Jan 2010 12:16:41 -0600 Subject: [PATCH] Don't die if user picks a popup menu item with no callback set (e.g. a submenu node). --- FL/menu_popup.C | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FL/menu_popup.C b/FL/menu_popup.C index d37b6a7..7e3dd05 100644 --- a/FL/menu_popup.C +++ b/FL/menu_popup.C @@ -30,7 +30,8 @@ menu_popup ( Fl_Menu_ *m ) if ( r ) { m->value( r ); - r->do_callback( static_cast(m) ); + if ( r->callback() ) + r->do_callback( static_cast(m) ); return true; }