Prevent Physics from trying to add a body to Physics world when there is none present

This commit is contained in:
Sachith Hasaranga Seneviratne 2014-08-05 20:13:17 +05:30
parent e4e0b7ec2f
commit f83a524f61

View File

@ -117,6 +117,7 @@ void TrackObjectManager::enable(std::string name)
curr->setEnable(true);
if (curr->getType() == "mesh")
{
if (curr->getPhysicalObject() != NULL)
curr->getPhysicalObject()->addBody();
}