summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-04-01 21:15:55 -0600
committerJared Adams <jaxad0127@gmail.com>2010-04-01 21:54:32 -0600
commit77a4c494ec2cbaf17a67024283012102aa4d0d52 (patch)
treeae2354c26ef0bbff5be956fd0a122ee0dfbaddcc
parent2bddef7af2e1fd01186188947fb685a47b228e3c (diff)
downloadmana-client-77a4c494ec2cbaf17a67024283012102aa4d0d52.tar.gz
mana-client-77a4c494ec2cbaf17a67024283012102aa4d0d52.tar.bz2
mana-client-77a4c494ec2cbaf17a67024283012102aa4d0d52.tar.xz
mana-client-77a4c494ec2cbaf17a67024283012102aa4d0d52.zip
Fix crash when trying to talk to NPCs under ManaServ at a distance
Reviewed-by: Chuck Miller
-rw-r--r--src/net/manaserv/npchandler.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/net/manaserv/npchandler.cpp b/src/net/manaserv/npchandler.cpp
index 5bacb90b..258c72c0 100644
--- a/src/net/manaserv/npchandler.cpp
+++ b/src/net/manaserv/npchandler.cpp
@@ -68,6 +68,9 @@ void NpcHandler::handleMessage(Net::MessageIn &msg)
if (diag == mNpcDialogs.end())
{
+ if (msg.getId() == GPMSG_NPC_ERROR || msg.getId() == GPMSG_NPC_CLOSE)
+ return; // Dialog is pointless in these cases
+
dialog = new NpcDialog(npcId);
Wrapper wrap;
wrap.dialog = dialog;