diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-22 04:08:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-22 04:10:20 +0300 |
commit | 502b0e4646df008d47c9e3e957f652932a231e8c (patch) | |
tree | 4c60a8705a5e62dea5c5c7591249d7b9858aec18 /src/map | |
parent | 540b4b0a29cbfbab4df73e4be4f86d9024a48959 (diff) | |
download | hercules-502b0e4646df008d47c9e3e957f652932a231e8c.tar.gz hercules-502b0e4646df008d47c9e3e957f652932a231e8c.tar.bz2 hercules-502b0e4646df008d47c9e3e957f652932a231e8c.tar.xz hercules-502b0e4646df008d47c9e3e957f652932a231e8c.zip |
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/
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/script.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |