summaryrefslogtreecommitdiff
path: root/src/net/tmwa/beinghandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-25 23:58:16 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-25 23:58:16 +0300
commit482782d74c61e226ed1ce81700708244565291f5 (patch)
treec955925952f091cdc71af8b1e7f8b3cdabecfa6b /src/net/tmwa/beinghandler.cpp
parentee12c6e77bd4d34d5fa682361127add32cc1a184 (diff)
downloadplus-482782d74c61e226ed1ce81700708244565291f5.tar.gz
plus-482782d74c61e226ed1ce81700708244565291f5.tar.bz2
plus-482782d74c61e226ed1ce81700708244565291f5.tar.xz
plus-482782d74c61e226ed1ce81700708244565291f5.zip
Add missing checks into net directory.
Diffstat (limited to 'src/net/tmwa/beinghandler.cpp')
-rw-r--r--src/net/tmwa/beinghandler.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 28c91fd28..8092a519f 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -238,6 +238,8 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
void BeingHandler::undress(Being *const being) const
{
+ if (!being)
+ return;
being->setSprite(SPRITE_WEAPON, 0);
being->setSprite(SPRITE_HEAD_BOTTOM, 0);
being->setSprite(SPRITE_CLOTHES_COLOR, 0);
@@ -1355,6 +1357,8 @@ void BeingHandler::processBeingChangeDirection(Net::MessageIn &msg)
void BeingHandler::setServerGender(Being *const being, const uint8_t gender)
{
+ if (!being)
+ return;
switch (gender)
{
case 2:
@@ -1376,6 +1380,8 @@ void BeingHandler::applyPlayerAction(Net::MessageIn &msg,
Being *const being,
const uint8_t type)
{
+ if (!being)
+ return;
switch (type)
{
case 0: