Skip to content

Commit

Permalink
ContentCAO: Fix segfault when minimap is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
SmallJoker committed Nov 8, 2020
1 parent 8c1871f commit c940a57
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/client/content_cao.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit c940a57

Please sign in to comment.