summaryrefslogtreecommitdiff
path: root/src/net/eathena/homunculusrecv.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/homunculusrecv.cpp
parent8be2905d29db5013bf8a2d9c5c7c7155af77ed49 (diff)
downloadplus-0e1d656e85e1bbc80e9e8adcfb2c07a8bc0d4bb8.tar.gz
plus-0e1d656e85e1bbc80e9e8adcfb2c07a8bc0d4bb8.tar.bz2
plus-0e1d656e85e1bbc80e9e8adcfb2c07a8bc0d4bb8.tar.xz
plus-0e1d656e85e1bbc80e9e8adcfb2c07a8bc0d4bb8.zip
Fix code style. Add missing actorManager null checks.
Diffstat (limited to 'src/net/eathena/homunculusrecv.cpp')
-rw-r--r--src/net/eathena/homunculusrecv.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/net/eathena/homunculusrecv.cpp b/src/net/eathena/homunculusrecv.cpp
index 476564d22..0f0d619ae 100644
--- a/src/net/eathena/homunculusrecv.cpp
+++ b/src/net/eathena/homunculusrecv.cpp
@@ -77,6 +77,8 @@ void HomunculusRecv::processHomunculusSkills(Net::MessageIn &msg)
void HomunculusRecv::processHomunculusData(Net::MessageIn &msg)
{
+ if (actorManager == nullptr)
+ return;
msg.readUInt8("unused");
const int cmd = msg.readUInt8("state");
const BeingId id = msg.readBeingId("homunculus id");
@@ -111,6 +113,8 @@ void HomunculusRecv::processHomunculusData(Net::MessageIn &msg)
void HomunculusRecv::processHomunculusInfo(Net::MessageIn &msg)
{
+ if (actorManager == nullptr)
+ return;
const std::string name = msg.readString(24, "name");
msg.readUInt8("flags"); // 0x01 - renamed, 0x02 - vaporize, 0x04 - alive
const int level = msg.readInt16("level");