Don't die if user picks a popup menu item with no callback set (e.g. a submenu node).

This commit is contained in:
Jonathan Moore Liles 2010-01-17 12:16:41 -06:00
parent 74df856ebe
commit 178ce417ee
1 changed files with 2 additions and 1 deletions

View File

@ -30,6 +30,7 @@ menu_popup ( Fl_Menu_ *m )
if ( r ) if ( r )
{ {
m->value( r ); m->value( r );
if ( r->callback() )
r->do_callback( static_cast<Fl_Widget*>(m) ); r->do_callback( static_cast<Fl_Widget*>(m) );
return true; return true;
} }