Use the correct name for deleting objects.

This commit is contained in:
cc9cii 2014-10-26 08:15:18 +11:00
parent b46df4034d
commit 8b0dc88db8

View file

@ -33,8 +33,8 @@ void CSVRender::Object::clearSceneNode (Ogre::SceneNode *node)
void CSVRender::Object::clear()
{
if(!mObject.isNull())
CSVWorld::PhysicsSystem::instance()->removeObject(mBase->getName());
if(!mObject.isNull() && !mReferenceId.empty())
CSVWorld::PhysicsSystem::instance()->removeObject(mReferenceId);
mObject.setNull();