1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00

Do not delete physics objects if it was never created (e.g. preview window)

This commit is contained in:
cc9cii 2014-12-01 10:07:02 +11:00
parent 2d229c70cb
commit 44b11163d1

View File

@ -156,7 +156,8 @@ CSVRender::Object::~Object()
{
clear();
mPhysics->removeObject(mBase->getName());
if(mPhysics) // preview may not have physics enabled
mPhysics->removeObject(mBase->getName());
if (mBase)
mBase->getCreator()->destroySceneNode (mBase);