Mixer: Don't die if user picks a submenu node in module context menu.

This commit is contained in:
Jonathan Moore Liles 2010-02-04 13:05:25 -06:00
parent 6015dc164a
commit 0b0fb9ad87
1 changed files with 6 additions and 0 deletions

View File

@ -399,6 +399,9 @@ Module::draw_label ( void )
void
Module::insert_menu_cb ( const Fl_Menu_ *m )
{
if ( ! m->mvalue() || m->mvalue()->flags & FL_SUBMENU_POINTER || m->mvalue()->flags & FL_SUBMENU )
return;
void * v = m->mvalue()->user_data();
if ( v )
@ -465,6 +468,9 @@ Module::menu_cb ( const Fl_Menu_ *m )
{
char picked[256];
if ( ! m->mvalue() || m->mvalue()->flags & FL_SUBMENU_POINTER || m->mvalue()->flags & FL_SUBMENU )
return;
strncpy( picked, m->mvalue()->label(), sizeof( picked ) );
// m->item_pathname( picked, sizeof( picked ) );