summaryrefslogtreecommitdiff
path: root/src/net/eathena/beingrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-02-12 03:13:01 +0300
committerAndrei Karas <akaras@inbox.ru>2018-02-12 03:13:01 +0300
commit0e1d656e85e1bbc80e9e8adcfb2c07a8bc0d4bb8 (patch)
tree5b537fe44b0753ced7c6f9fd1aa916604c178f2f /src/net/eathena/beingrecv.cpp
parent8be2905d29db5013bf8a2d9c5c7c7155af77ed49 (diff)
downloadmanaplus-0e1d656e85e1bbc80e9e8adcfb2c07a8bc0d4bb8.tar.gz
manaplus-0e1d656e85e1bbc80e9e8adcfb2c07a8bc0d4bb8.tar.bz2
manaplus-0e1d656e85e1bbc80e9e8adcfb2c07a8bc0d4bb8.tar.xz
manaplus-0e1d656e85e1bbc80e9e8adcfb2c07a8bc0d4bb8.zip
Fix code style. Add missing actorManager null checks.
Diffstat (limited to 'src/net/eathena/beingrecv.cpp')
-rw-r--r--src/net/eathena/beingrecv.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index a9b7aa7f8..f2b02b05c 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -1066,7 +1066,8 @@ void BeingRecv::processSkillCastingContinue(Net::MessageIn &msg,
const SkillType2::SkillType2 inf2,
const int castTime)
{
- if (effectManager == nullptr)
+ if (effectManager == nullptr ||
+ actorManager == nullptr)
return;
if (srcId == BeingId_zero)
@@ -1301,6 +1302,8 @@ void BeingRecv::processBeingAction2(Net::MessageIn &msg)
void BeingRecv::processBeingHp(Net::MessageIn &msg)
{
+ if (actorManager == nullptr)
+ return;
Being *const dstBeing = actorManager->findBeing(
msg.readBeingId("being id"));
int hp;
@@ -1324,6 +1327,8 @@ void BeingRecv::processBeingHp(Net::MessageIn &msg)
void BeingRecv::processMonsterHp(Net::MessageIn &msg)
{
+ if (actorManager == nullptr)
+ return;
Being *const dstBeing = actorManager->findBeing(
msg.readBeingId("monster id"));
const int hp = msg.readInt32("hp");
@@ -1696,6 +1701,8 @@ void BeingRecv::processBeingStatUpdate1(Net::MessageIn &msg)
const int type = msg.readInt16("type");
const int value = msg.readInt32("value");
+ if (actorManager == nullptr)
+ return;
Being *const dstBeing = actorManager->findBeing(id);
if (dstBeing == nullptr)
return;
@@ -1736,6 +1743,8 @@ void BeingRecv::processBeingSelfEffect(Net::MessageIn &msg)
void BeingRecv::processMobInfo(Net::MessageIn &msg)
{
+ if (actorManager == nullptr)
+ return;
const int len = msg.readInt16("len");
if (len < 12)
return;
@@ -1748,6 +1757,8 @@ void BeingRecv::processMobInfo(Net::MessageIn &msg)
void BeingRecv::processBeingAttrs(Net::MessageIn &msg)
{
+ if (actorManager == nullptr)
+ return;
const int len = msg.readInt16("len");
if (len < 14)
return;
@@ -1803,6 +1814,8 @@ void BeingRecv::processClassChange(Net::MessageIn &msg)
void BeingRecv::processSpiritBalls(Net::MessageIn &msg)
{
+ if (actorManager == nullptr)
+ return;
Being *const dstBeing = actorManager->findBeing(
msg.readBeingId("being id"));
const int balls = msg.readInt16("spirits amount");
@@ -1836,6 +1849,8 @@ void BeingRecv::processWddingEffect(Net::MessageIn &msg)
void BeingRecv::processBeingSlide(Net::MessageIn &msg)
{
+ if (actorManager == nullptr)
+ return;
Being *const dstBeing = actorManager->findBeing(
msg.readBeingId("being id"));
const int x = msg.readInt16("x");