From 80c750a0a4bd03efa1b9111bfd4ab89f87c0721c Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 2 Sep 2022 14:30:44 +0200 Subject: [PATCH] GUI: Fix mass add crash with older ScummVM configs --- gui/massadd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/massadd.cpp b/gui/massadd.cpp index 8a3cbb4cdbf..839e0027244 100644 --- a/gui/massadd.cpp +++ b/gui/massadd.cpp @@ -210,8 +210,8 @@ void MassAddDialog::handleTickle() { // If the engineid, gameid, platform and language match -> skip it Common::ConfigManager::Domain *dom = ConfMan.getDomain(*iter); assert(dom); - - if ((*dom)["engineid"] == result.engineId && + + if ((!dom->contains("engineid") || (*dom)["engineid"] == result.engineId) && (*dom)["gameid"] == result.gameId && dom->getValOrDefault("platform") == resultPlatformCode && parseLanguage(dom->getValOrDefault("language")) == parseLanguage(resultLanguageCode)) {