Sequencer: Don't crash when user picks the branch instead of the leaf in scale chooser.

This commit is contained in:
Jonathan Moore Liles 2020-09-27 23:13:24 -07:00
parent 10bcd0c2d7
commit e36a053b84
1 changed files with 6 additions and 0 deletions

View File

@ -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() );