summaryrefslogtreecommitdiff
path: root/src/net/ea/playerrecv.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ea/playerrecv.cpp')
-rw-r--r--src/net/ea/playerrecv.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/net/ea/playerrecv.cpp b/src/net/ea/playerrecv.cpp
index b0b9bab70..ab588e95d 100644
--- a/src/net/ea/playerrecv.cpp
+++ b/src/net/ea/playerrecv.cpp
@@ -1,11 +1,11 @@
/*
- * The ManaPlus Client
+ * The ManaVerse Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
* Copyright (C) 2011-2020 The ManaPlus Developers
- * Copyright (C) 2020-2023 The ManaVerse Developers
+ * Copyright (C) 2020-2025 The ManaVerse Developers
*
- * This file is part of The ManaPlus Client.
+ * This file is part of The ManaVerse Client.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -45,6 +45,7 @@
#include "net/playerhandler.h"
+#include "utils/performance.h"
#include "utils/stdmove.h"
#include "utils/stringutils.h"
@@ -239,7 +240,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);
}