[Crash] Fix crash when map name is null (#4322)

This commit is contained in:
Chris Miles 2024-05-24 20:53:54 -05:00 committed by GitHub
parent 2586527157
commit 6dc661032f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1140,6 +1140,11 @@ bool Zone::Init(bool is_static) {
}
}
if (!map_name) {
LogError("No map name found for zone [{}]", GetShortName());
return false;
}
zonemap = Map::LoadMapFile(map_name);
watermap = WaterMap::LoadWaterMapfile(map_name);
pathing = IPathfinder::Load(map_name);