summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/playerrecv.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/net/ea/playerrecv.cpp b/src/net/ea/playerrecv.cpp
index b0b9bab70..b4bbc9ce4 100644
--- a/src/net/ea/playerrecv.cpp
+++ b/src/net/ea/playerrecv.cpp
@@ -239,7 +239,12 @@ void PlayerRecv::processMapMask(Net::MessageIn &msg)
{
const int mask = msg.readInt32("mask");
msg.readInt32("unused");
- Map *const map = Game::instance()->getCurrentMap();
+
+ const Game *const game = Game::instance();
+ if (game == nullptr)
+ return;
+
+ Map *const map = game->getCurrentMap();
if (map != nullptr)
map->setMask(mask);
}