diff options
Diffstat (limited to 'qmidiplayer-desktop/qmppresetselect.cpp')
-rw-r--r-- | qmidiplayer-desktop/qmppresetselect.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/qmidiplayer-desktop/qmppresetselect.cpp b/qmidiplayer-desktop/qmppresetselect.cpp index be589c5..ef67d70 100644 --- a/qmidiplayer-desktop/qmppresetselect.cpp +++ b/qmidiplayer-desktop/qmppresetselect.cpp @@ -73,6 +73,7 @@ void qmpPresetSelector::on_pbCancel_clicked() void qmpPresetSelector::on_pbOk_clicked() { CMidiPlayer *plyr=qmpMainWindow::getInstance()->getPlayer(); + if(!ui->lwBankSelect->currentItem()||!ui->lwPresetSelect->currentItem())return (void)close(); int b,p;sscanf(ui->lwBankSelect->currentItem()->text().toStdString().c_str(),"%d",&b); sscanf(ui->lwPresetSelect->currentItem()->text().toStdString().c_str(),"%d",&p); plyr->setChannelPreset(ch,b,p); |