summaryrefslogtreecommitdiff
path: root/src/net/eathena/vendingrecv.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/vendingrecv.cpp
parent8be2905d29db5013bf8a2d9c5c7c7155af77ed49 (diff)
downloadmv-0e1d656e85e1bbc80e9e8adcfb2c07a8bc0d4bb8.tar.gz
mv-0e1d656e85e1bbc80e9e8adcfb2c07a8bc0d4bb8.tar.bz2
mv-0e1d656e85e1bbc80e9e8adcfb2c07a8bc0d4bb8.tar.xz
mv-0e1d656e85e1bbc80e9e8adcfb2c07a8bc0d4bb8.zip
Fix code style. Add missing actorManager null checks.
Diffstat (limited to 'src/net/eathena/vendingrecv.cpp')
-rw-r--r--src/net/eathena/vendingrecv.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/net/eathena/vendingrecv.cpp b/src/net/eathena/vendingrecv.cpp
index 4839fa74e..2e8092886 100644
--- a/src/net/eathena/vendingrecv.cpp
+++ b/src/net/eathena/vendingrecv.cpp
@@ -74,6 +74,8 @@ void VendingRecv::processOpenReq(Net::MessageIn &msg)
void VendingRecv::processShowBoard(Net::MessageIn &msg)
{
+ if (actorManager == nullptr)
+ return;
const BeingId id = msg.readBeingId("owner id");
Being *const dstBeing = actorManager->findBeing(id);
if (dstBeing != nullptr)
@@ -88,6 +90,8 @@ void VendingRecv::processShowBoard(Net::MessageIn &msg)
void VendingRecv::processHideBoard(Net::MessageIn &msg)
{
+ if (actorManager == nullptr)
+ return;
const BeingId id = msg.readBeingId("owner id");
Being *const dstBeing = actorManager->findBeing(id);
if (dstBeing != nullptr)
@@ -101,6 +105,8 @@ void VendingRecv::processHideBoard(Net::MessageIn &msg)
void VendingRecv::processItemsList(Net::MessageIn &msg)
{
+ if (actorManager == nullptr)
+ return;
int packetLen = 22;
if (msg.getVersion() >= 20160921)
packetLen = 53;