summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-31 23:01:23 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-31 23:01:23 +0300
commit9936ef294fcb604c16f447c0353cc6f4c43c6ed8 (patch)
treed21067881f0e5e147efe2f32a91f2425e479b241 /src
parentdb5fd3795cba3d30bb3d031719a272eec23cd586 (diff)
downloadhercules-9936ef294fcb604c16f447c0353cc6f4c43c6ed8.tar.gz
hercules-9936ef294fcb604c16f447c0353cc6f4c43c6ed8.tar.bz2
hercules-9936ef294fcb604c16f447c0353cc6f4c43c6ed8.tar.xz
hercules-9936ef294fcb604c16f447c0353cc6f4c43c6ed8.zip
fix for bug http://hercules.ws/board/tracker/issue-8483-map-crash/
Diffstat (limited to 'src')
-rw-r--r--src/map/npc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 8b5bbc83e..6762684af 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -987,6 +987,12 @@ int npc_untouch_areanpc(struct map_session_data* sd, int16 m, int16 x, int16 y)
return 0;
nd = (struct npc_data *) map->id2bl(sd->areanpc_id);
+ if (!nd)
+ {
+ sd->areanpc_id = 0;
+ return 1;
+ }
+
npc->onuntouch_event(sd, nd);
sd->areanpc_id = 0;
return 0;