Media prefs: fix crash in empty MIDI soundfont list
Check if soundfont list is empty or we crash when double-clicking into the list. Fixes #13091.
This commit is contained in:
parent
d676701752
commit
dd3732bb93
|
@ -136,6 +136,9 @@ MidiSettingsView::MessageReceived(BMessage* message)
|
|||
case kDoubleClick:
|
||||
{
|
||||
int selection = fListView->CurrentSelection();
|
||||
if (selection < 0)
|
||||
break;
|
||||
|
||||
BStringItem* item = (BStringItem*)fListView->ItemAt(selection);
|
||||
|
||||
BEntry entry(item->Text());
|
||||
|
|
Loading…
Reference in New Issue