1
0

Fixed crash introduced by #2821

This commit is contained in:
LogicParrot 2016-01-12 15:13:53 +02:00
parent d4e99aedb1
commit 41f2b6c99f

View File

@ -369,7 +369,8 @@ void cRoot::LoadWorlds(cSettingsRepositoryInterface & a_Settings, bool a_IsNewIn
if (DefaultWorldName == "world")
{
auto DefaultWorldIniFile= cpp14::make_unique<cIniFile>();
assert(DefaultWorldIniFile->ReadFile("world/world.ini"));
if (DefaultWorldIniFile->ReadFile("world/world.ini"))
{
AString NetherName = DefaultWorldIniFile->GetValue("LinkedWorlds", "NetherWorldName", "");
AString EndName = DefaultWorldIniFile->GetValue("LinkedWorlds", "EndWorldName", "");
if ((NetherName.compare("world_nether") == 0) && (EndName.compare("world_end") == 0))
@ -408,6 +409,7 @@ void cRoot::LoadWorlds(cSettingsRepositoryInterface & a_Settings, bool a_IsNewIn
}
}
}
}
// Then load the other worlds
if (Worlds.size() <= 0)