Sequencer: Don't crash when user picks the branch instead of the leaf in scale chooser.
This commit is contained in:
parent
10bcd0c2d7
commit
e36a053b84
|
@ -847,6 +847,12 @@ o->maximum( pattern::patterns() );}
|
|||
char picked[80];
|
||||
mapping_menu->item_pathname(picked, sizeof(picked)-1 );
|
||||
|
||||
const char *text = o->text();
|
||||
|
||||
if ( ! strcmp( text, picked ) )
|
||||
// nothing picked...
|
||||
return;
|
||||
|
||||
if ( 0 == strncmp( picked, "Instrument", strlen( "Instrument" ) ) )
|
||||
{
|
||||
((pattern*)pattern_canvas_widget->grid())->mapping.open( Mapping::INSTRUMENT, o->text() );
|
||||
|
|
Loading…
Reference in New Issue