addressed potential 0-pointer issue

openmw-35
Marc Zinnschlag 10 years ago
parent f3c7532660
commit 7b8e6f9dda

@ -156,11 +156,13 @@ CSVRender::Object::~Object()
{
clear();
if(mPhysics) // preview may not have physics enabled
mPhysics->removeObject(mBase->getName());
if (mBase)
{
if(mPhysics) // preview may not have physics enabled
mPhysics->removeObject(mBase->getName());
mBase->getCreator()->destroySceneNode (mBase);
}
}
bool CSVRender::Object::referenceableDataChanged (const QModelIndex& topLeft,

Loading…
Cancel
Save