diff options
author | SmallJoker <mk939@ymail.com> | 2020-11-08 11:30:16 +0100 |
---|---|---|
committer | SmallJoker <mk939@ymail.com> | 2020-11-08 11:30:16 +0100 |
commit | c940a57a384b1a75730776906451078d25c5aa52 (patch) | |
tree | 0eb4843a765cd41fc156ce03da9ccc4723faac73 /src/client | |
parent | 8c1871fa2c066a2086988684256da97bd0f4ab6f (diff) | |
download | minetest-c940a57a384b1a75730776906451078d25c5aa52.tar.gz minetest-c940a57a384b1a75730776906451078d25c5aa52.tar.bz2 minetest-c940a57a384b1a75730776906451078d25c5aa52.zip |
ContentCAO: Fix segfault when minimap is disabled
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/content_cao.cpp | 3 |
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); |