aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2009-06-06 19:04:09 +0000
committerFilippos Karapetis2009-06-06 19:04:09 +0000
commit6c44c7764c3776e6189cd1dfb519709c4864d7fa (patch)
tree0497f6cf6f0cfd4002da9a9ae43595d5abb03d9d
parentb43df63b1c335c7c3f03dcbf2bb645ea63c59149 (diff)
downloadscummvm-rg350-6c44c7764c3776e6189cd1dfb519709c4864d7fa.tar.gz
scummvm-rg350-6c44c7764c3776e6189cd1dfb519709c4864d7fa.tar.bz2
scummvm-rg350-6c44c7764c3776e6189cd1dfb519709c4864d7fa.zip
Fixed assertion when starting mass add and there are no games currently in the game list
svn-id: r41293
-rw-r--r--gui/launcher.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 14c98a1eb6..85c040cc09 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -652,8 +652,10 @@ void LauncherDialog::addGame() {
if (alert.runModal() == GUI::kMessageOK && _browser->runModal() > 0) {
MassAddDialog massAddDlg(_browser->getResult());
- // Save current game position, so on cancel cursor will move back
- ConfMan.set("temp_selection", _domains[_list->getSelected()], ConfigManager::kApplicationDomain);
+ if (_list->getList().size() > 0) {
+ // Save current game position, so on cancel cursor will move back
+ ConfMan.set("temp_selection", _domains[_list->getSelected()], ConfigManager::kApplicationDomain);
+ }
massAddDlg.runModal();