Skip to content

Commit a133921

Browse files
committed
2 parents 85c4379 + 9363969 commit a133921

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

addgamedialog.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,15 @@ void AddGameDialog::on_buttonBox_accepted()
6161
game.setType(Executable);
6262
if(ui->launcherEnabledCheckBox->isChecked())
6363
{
64-
game.setLauncher(launchers->at(ui->launcherComboBox->itemData(ui->launcherComboBox->currentIndex()).toInt()));
64+
if ((ui->launcherComboBox->itemText(ui->launcherComboBox->currentIndex()).isEmpty()) || (ui->launcherComboBox->itemText(ui->launcherComboBox->currentIndex()).isNull()))
65+
{
66+
67+
ui->launcherEnabledCheckBox->setChecked(false);
68+
}
69+
else
70+
{
71+
game.setLauncher(launchers->at(ui->launcherComboBox->itemData(ui->launcherComboBox->currentIndex()).toInt()));
72+
}
6573
}
6674

6775
emit AddGameDialog::gameSet(game);

0 commit comments

Comments
 (0)