aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmppresetselect.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-13 23:13:15 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-13 23:13:15 +0800
commit2888a8349d11a3e959c300256ce36e824337e636 (patch)
tree390a70369be170271741a60692b966adc1032219 /qmidiplayer-desktop/qmppresetselect.cpp
parent43ae9bb08b7f3f18028fa8663a6077f4ae1ccbca (diff)
downloadQMidiPlayer-2888a8349d11a3e959c300256ce36e824337e636.tar.xz
Ghost Lead.
Diffstat (limited to 'qmidiplayer-desktop/qmppresetselect.cpp')
-rw-r--r--qmidiplayer-desktop/qmppresetselect.cpp1
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);