Skip to content

Commit

Permalink
Fix destroying wide angle camera (#718)
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 authored Sep 16, 2022
1 parent da973f5 commit 7e3371b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ogre/src/OgreWideAngleCamera.cc
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,13 @@ void OgreWideAngleCamera::Destroy()
this->dataPtr->ogreRenderTexture->getName());
this->dataPtr->ogreRenderTexture = nullptr;
}

if (!this->dataPtr->compMat.isNull())
{
Ogre::MaterialManager::getSingleton().remove(
this->dataPtr->compMat->getName());
this->dataPtr->compMat.setNull();
}
}

//////////////////////////////////////////////////
Expand Down

0 comments on commit 7e3371b

Please sign in to comment.