Mixer: Don't die if user picks a submenu node in module context menu.
This commit is contained in:
parent
6015dc164a
commit
0b0fb9ad87
|
@ -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 ) );
|
||||
|
|
Loading…
Reference in New Issue