mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
Merge pull request #12918 from kitely/fix-addentity-failure
Fixed null pointer exception if importing an entity from JSON fails
This commit is contained in:
commit
9e1bd69af3
1 changed files with 4 additions and 1 deletions
|
@ -2285,7 +2285,10 @@ bool EntityTree::sendEntitiesOperation(const OctreeElementPointer& element, void
|
|||
if (args->otherTree) {
|
||||
args->otherTree->withWriteLock([&] {
|
||||
EntityItemPointer entity = args->otherTree->addEntity(newID, properties);
|
||||
entity->deserializeActions();
|
||||
if (entity) {
|
||||
entity->deserializeActions();
|
||||
}
|
||||
// else: there was an error adding this entity
|
||||
});
|
||||
}
|
||||
return newID;
|
||||
|
|
Loading…
Reference in a new issue