summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/playerhandler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index f704576e..9c1a7135 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -516,8 +516,9 @@ void PlayerHandler::handleMessage(MessageIn &msg)
{
const int mask = msg.readInt32();
msg.readInt32(); // unused
- if (Map *map = Game::instance()->getCurrentMap())
- map->setMask(mask);
+ if (auto game = Game::instance())
+ if (Map *map = game->getCurrentMap())
+ map->setMask(mask);
}
break;
}