aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSmallJoker <mk939@ymail.com>2020-11-08 11:30:16 +0100
committerSmallJoker <mk939@ymail.com>2020-11-08 11:30:16 +0100
commitc940a57a384b1a75730776906451078d25c5aa52 (patch)
tree0eb4843a765cd41fc156ce03da9ccc4723faac73
parent8c1871fa2c066a2086988684256da97bd0f4ab6f (diff)
downloadminetest-c940a57a384b1a75730776906451078d25c5aa52.tar.gz
minetest-c940a57a384b1a75730776906451078d25c5aa52.tar.bz2
minetest-c940a57a384b1a75730776906451078d25c5aa52.zip
ContentCAO: Fix segfault when minimap is disabled
-rw-r--r--src/client/content_cao.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/content_cao.cpp b/src/client/content_cao.cpp
index e7f9db845..7c349244f 100644
--- a/src/client/content_cao.cpp
+++ b/src/client/content_cao.cpp
@@ -894,6 +894,9 @@ u16 GenericCAO::getLightPosition(v3s16 *pos)
void GenericCAO::updateMarker()
{
+ if (!m_client->getMinimap())
+ return;
+
if (!m_prop.show_on_minimap) {
if (m_marker)
m_client->getMinimap()->removeMarker(&m_marker);