OsgRender.cpp: Do not set pointers to NULL on destructor

It provides no benefit to do so, since the object would be destroyed
anyway and therefore it would be impossible to reuse these pointers.
Doing so can only mask potential memory errors.
This commit is contained in:
Xavier Del Campo Romero 2025-01-18 07:04:55 +01:00
parent 6d7088adf5
commit 559b2974d6
Signed by: xavi
GPG key ID: 84FF3612A9BF43F2

View file

@ -133,22 +133,9 @@ SDRender::~SDRender(void)
m_Root->removeChildren(0, m_Root->getNumChildren());
stateSet->getTextureAttributeList().clear();
stateSet->getTextureModeList().clear();
m_CarRoot = NULL;
m_CarLightsRoot = NULL;
m_ShadowRoot = NULL;
m_ShadowSlot = NULL;
m_NonShadowRoot = NULL;
m_Scene = NULL;
m_Root = NULL;
m_Fog = NULL;
}
if (thesky)
{
delete thesky;
thesky = NULL;
}
delete thesky;
SDTrack = NULL;
}