crashfix. free will eventually lead to destroyself so don't doubleup or it trys to kill the dead. zombu bad.

This commit is contained in:
Azaezel 2018-10-17 21:05:38 -05:00
parent d484a1a46e
commit b4e28343da

View file

@ -71,19 +71,16 @@ ProbeRenderInst::ProbeRenderInst() : SystemInterface(),
ProbeRenderInst::~ProbeRenderInst()
{
if (mCubemap && !mCubemap->isNull())
if (mCubemap && mCubemap->isValid())
{
mCubemap->getPointer()->destroySelf();
mCubemap->free();
}
if (mIrradianceCubemap && !mIrradianceCubemap->isNull())
if (mIrradianceCubemap && mIrradianceCubemap->isValid())
{
mIrradianceCubemap->getPointer()->destroySelf();
mIrradianceCubemap->free();
}
if (mBRDFTexture && !mBRDFTexture->isNull())
if (mBRDFTexture && mBRDFTexture->isValid())
{
mBRDFTexture->getPointer()->destroySelf();
mBRDFTexture->free();
}
}