Additional check in map_mapid2mapname (#4373)

* The mapid2name script command didn't check if the map existed (potential crash)
This commit is contained in:
Atemo 2020-02-04 15:01:00 +01:00 committed by GitHub
parent 6c8840ca54
commit 78eb1bcd7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2979,6 +2979,9 @@ const char* map_mapid2mapname(int m)
struct map_data *mapdata = map_getmapdata(m);
if (!mapdata)
return "";
if (mapdata->instance_id) { // Instance map check
struct instance_data *im = &instance_data[mapdata->instance_id];