summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-02-12 04:08:09 +0300
committerAndrei Karas <akaras@inbox.ru>2018-02-12 04:09:13 +0300
commit081694ca70c7ebbd91bb1f49c58687a6cd33dfa0 (patch)
tree70cc4d84135519c633a692f22b7f905da02ad980 /src/map/map.c
parentfbeaa2fc7f40999f6f6b96ab1e6b2f5de11a5d6c (diff)
downloadhercules-081694ca70c7ebbd91bb1f49c58687a6cd33dfa0.tar.gz
hercules-081694ca70c7ebbd91bb1f49c58687a6cd33dfa0.tar.bz2
hercules-081694ca70c7ebbd91bb1f49c58687a6cd33dfa0.tar.xz
hercules-081694ca70c7ebbd91bb1f49c58687a6cd33dfa0.zip
Fix possible crash in zone change code. Fixes #1971
In function map_zone_change2 silently exit if zone is NULL.
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 106224a47..bb367a08d 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -4502,6 +4502,8 @@ void map_zone_change2(int m, struct map_zone_data *zone)
{
const char *empty = "";
+ if (zone == NULL)
+ return;
Assert_retv(m >= 0 && m < map->count);
if( map->list[m].zone == zone )
return;