summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/localplayer.cpp3
-rw-r--r--src/net/tmwa/playerhandler.cpp2
-rw-r--r--src/net/tmwa/specialhandler.cpp3
3 files changed, 6 insertions, 2 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index cea27960..4d0ad17e 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -1090,7 +1090,8 @@ void LocalPlayer::setMaxWeight(int value)
{
mMaxWeight = value;
- inventoryWindow->updateWeight();
+ if (inventoryWindow)
+ inventoryWindow->updateWeight();
}
void LocalPlayer::setAttributeBase(int num, int value, bool notify)
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;