]> git.lizzy.rs Git - minetest.git/commitdiff
ContentCAO: Fix segfault when minimap is disabled
authorSmallJoker <mk939@ymail.com>
Sun, 8 Nov 2020 10:30:16 +0000 (11:30 +0100)
committerSmallJoker <mk939@ymail.com>
Sun, 8 Nov 2020 10:30:16 +0000 (11:30 +0100)
src/client/content_cao.cpp

index e7f9db845c80bb77b2c092312a896dcc09693ae1..7c349244fd39875207ff0879566822b196d982c0 100644 (file)
@@ -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);