diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/launcher.cpp | 6 | ||||
-rw-r--r-- | gui/launcher.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 64323dabd9..a9f25dcf42 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -690,11 +690,12 @@ void LauncherDialog::addGame() { } -void LauncherDialog::addGameToConf(FilesystemNode dir, GameDescriptor result, bool suppressEditDialog) { +void LauncherDialog::addGameToConf(const FilesystemNode &dir, const GameDescriptor &result, bool suppressEditDialog) { // The auto detector or the user made a choice. // Pick a domain name which does not yet exist (after all, we // are *adding* a game to the config, not replacing). String domain(result.gameid()); + assert(!domain.empty()); if (ConfMan.hasGameDomain(domain)) { int suffixN = 1; char suffix[16]; @@ -718,7 +719,8 @@ void LauncherDialog::addGameToConf(FilesystemNode dir, GameDescriptor result, bo // game target, we can change this (currently, you can only query // for the generic gameid description; it's not possible to obtain // a description which contains extended information like language, etc.). - ConfMan.set("description", result.description(), domain); + if (!result.description().empty()) + ConfMan.set("description", result.description(), domain); ConfMan.set("gameid", result.gameid(), domain); ConfMan.set("path", dir.path(), domain); diff --git a/gui/launcher.h b/gui/launcher.h index bb2bc21f45..73cf8f4186 100644 --- a/gui/launcher.h +++ b/gui/launcher.h @@ -68,7 +68,7 @@ protected: void selectGame(const String &name); - void addGameToConf(FilesystemNode dir, GameDescriptor result, bool suppressEditDialog); + void addGameToConf(const FilesystemNode &dir, const GameDescriptor &result, bool suppressEditDialog); void addGameRecursive(FilesystemNode dir); }; |