Skip to content

Commit c940a57

Browse files
committed
ContentCAO: Fix segfault when minimap is disabled
1 parent 8c1871f commit c940a57

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/client/content_cao.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,9 @@ u16 GenericCAO::getLightPosition(v3s16 *pos)
894894

895895
void GenericCAO::updateMarker()
896896
{
897+
if (!m_client->getMinimap())
898+
return;
899+
897900
if (!m_prop.show_on_minimap) {
898901
if (m_marker)
899902
m_client->getMinimap()->removeMarker(&m_marker);

0 commit comments

Comments
 (0)