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.
This commit is contained in:
Bastien Bouclet 2018-06-30 19:12:56 +02:00
parent ca79603a1e
commit e26259d758

View File

@ -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];