From 9936ef294fcb604c16f447c0353cc6f4c43c6ed8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 31 Dec 2014 23:01:23 +0300 Subject: fix for bug http://hercules.ws/board/tracker/issue-8483-map-crash/ --- src/map/npc.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- cgit v1.2.3-70-g09d2