From c940a57a384b1a75730776906451078d25c5aa52 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sun, 8 Nov 2020 11:30:16 +0100 Subject: ContentCAO: Fix segfault when minimap is disabled --- src/client/content_cao.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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); -- cgit v1.2.3