Skip to content

Commit 7e3371b

Browse files
authored
Fix destroying wide angle camera (#718)
Signed-off-by: Ian Chen <[email protected]>
1 parent da973f5 commit 7e3371b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ogre/src/OgreWideAngleCamera.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,13 @@ void OgreWideAngleCamera::Destroy()
193193
this->dataPtr->ogreRenderTexture->getName());
194194
this->dataPtr->ogreRenderTexture = nullptr;
195195
}
196+
197+
if (!this->dataPtr->compMat.isNull())
198+
{
199+
Ogre::MaterialManager::getSingleton().remove(
200+
this->dataPtr->compMat->getName());
201+
this->dataPtr->compMat.setNull();
202+
}
196203
}
197204

198205
//////////////////////////////////////////////////

0 commit comments

Comments
 (0)