From 502b0e4646df008d47c9e3e957f652932a231e8c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 22 Feb 2016 04:08:59 +0300 Subject: Fix crash on npc emote, if npc not found. Reported in http://herc.ws/board/topic/11994-map-crashed-on-friendly-poring-quest-novice-quest/ --- src/map/script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/map') diff --git a/src/map/script.c b/src/map/script.c index 946b50955..289ea36e2 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -12105,7 +12105,7 @@ BUILDIN(emotion) { clif->emotion(&sd->bl,type); } else if( script_hasdata(st,4) ) { struct npc_data *nd = npc->name2id(script_getstr(st,4)); - if (nd == NULL) + if (nd != NULL) clif->emotion(&nd->bl,type); } else { clif->emotion(map->id2bl(st->oid),type); -- cgit v1.2.3-70-g09d2