mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 04:03:59 +02:00
Merge pull request #4901 from AndrewMeadows/thermonuclear
check for NULL before using pointer to EntityItem
This commit is contained in:
commit
bf6d5af16d
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue