1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Handle invalid main menu config

This commit is contained in:
Ivan Savenko 2024-05-20 11:00:21 +00:00
parent d6ff7896fe
commit 017aaefc40

View File

@ -274,7 +274,8 @@ CMainMenuConfig::CMainMenuConfig()
: campaignSets(JsonPath::builtin("config/campaignSets.json"))
, config(JsonPath::builtin("config/mainmenu.json"))
{
if (config["game-select"].Vector().empty())
handleFatalError("Main menu config is invalid or corrupted. Please disable any mods or reinstall VCMI", false);
}
const CMainMenuConfig & CMainMenuConfig::get()