diff options
author | Bastien Bouclet | 2018-06-30 19:12:56 +0200 |
---|---|---|
committer | Bastien Bouclet | 2018-06-30 19:17:41 +0200 |
commit | e26259d758f3bc948fa6b2571d50a5944d94e9f0 (patch) | |
tree | 9adbcc6e7e05bd387b923ee6973cfb5af5a9bd13 /gui | |
parent | ca79603a1ef1fcf182b56900f75bef5b04db1920 (diff) | |
download | scummvm-rg350-e26259d758f3bc948fa6b2571d50a5944d94e9f0.tar.gz scummvm-rg350-e26259d758f3bc948fa6b2571d50a5944d94e9f0.tar.bz2 scummvm-rg350-e26259d758f3bc948fa6b2571d50a5944d94e9f0.zip |
GUI: Fix null pointer dereference in mass add
When looking for duplicates if the detected game had an unknown platform
or an unknown language, the string for the corresponding code is null,
resulting in a null pointer dereference.
Diffstat (limited to 'gui')
-rw-r--r-- | gui/massadd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gui/massadd.cpp b/gui/massadd.cpp index 8bc5a10720..66a1a23423 100644 --- a/gui/massadd.cpp +++ b/gui/massadd.cpp @@ -209,8 +209,8 @@ void MassAddDialog::handleTickle() { // Check for existing config entries for this path/gameid/lang/platform combination if (_pathToTargets.contains(path)) { - const char *resultPlatformCode = Common::getPlatformCode(result.platform); - const char *resultLanguageCode = Common::getLanguageCode(result.language); + Common::String resultPlatformCode = Common::getPlatformCode(result.platform); + Common::String resultLanguageCode = Common::getLanguageCode(result.language); bool duplicate = false; const StringArray &targets = _pathToTargets[path]; |