Merge pull request #4901 from AndrewMeadows/thermonuclear

check for NULL before using pointer to EntityItem
This commit is contained in:
Philip Rosedale 2015-05-16 18:33:00 -07:00
commit bf6d5af16d

View file

@ -85,8 +85,8 @@ EntityItemID EntityScriptingInterface::addEntity(const EntityItemProperties& pro
if (_entityTree) {
_entityTree->lockForWrite();
EntityItem* entity = _entityTree->addEntity(id, propertiesWithSimID);
entity->setLastBroadcast(usecTimestampNow());
if (entity) {
entity->setLastBroadcast(usecTimestampNow());
// This Node is creating a new object. If it's in motion, set this Node as the simulator.
bidForSimulationOwnership(propertiesWithSimID);
} else {