From 3e50aa43e13ed0cd2f5bb937c46bd064bdbfeeff Mon Sep 17 00:00:00 2001 From: Stefan Dombrowski Date: Wed, 27 Apr 2011 22:18:27 +0200 Subject: Fixing crash when selecting a character that has a Dark Talisman equipped This resolves http://bugs.manasource.org/view.php?id=330 Reviewed-by: Bertram --- src/net/tmwa/playerhandler.cpp | 2 ++ src/net/tmwa/specialhandler.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/net/tmwa') diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index 49db66ae..3dab8c34 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -233,6 +233,8 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg) case SMSG_PLAYER_STAT_UPDATE_1: { + if (!player_node) + break; int type = msg.readInt16(); int value = msg.readInt32(); diff --git a/src/net/tmwa/specialhandler.cpp b/src/net/tmwa/specialhandler.cpp index c5f5d540..bcf5ba44 100644 --- a/src/net/tmwa/specialhandler.cpp +++ b/src/net/tmwa/specialhandler.cpp @@ -107,7 +107,8 @@ void SpecialHandler::handleMessage(Net::MessageIn &msg) player_node->setAttributeBase(skillId, level); player_node->setAttributeEffective(skillId, level); - skillDialog->setModifiable(skillId, up); + if (skillDialog) + skillDialog->setModifiable(skillId, up); } break; -- cgit v1.2.3-70-g09d2