ContentCAO: Fix segfault when minimap is disabled
parent
8c1871fa2c
commit
c940a57a38
|
@ -894,6 +894,9 @@ u16 GenericCAO::getLightPosition(v3s16 *pos)
|
||||||
|
|
||||||
void GenericCAO::updateMarker()
|
void GenericCAO::updateMarker()
|
||||||
{
|
{
|
||||||
|
if (!m_client->getMinimap())
|
||||||
|
return;
|
||||||
|
|
||||||
if (!m_prop.show_on_minimap) {
|
if (!m_prop.show_on_minimap) {
|
||||||
if (m_marker)
|
if (m_marker)
|
||||||
m_client->getMinimap()->removeMarker(&m_marker);
|
m_client->getMinimap()->removeMarker(&m_marker);
|
||||||
|
|
Loading…
Reference in New Issue