mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
When importing entities from JSON: fixed a null pointer exception if addEntity() failed on any of the entities
This commit is contained in:
parent
4c0a0a84fa
commit
91e27db9b0
1 changed files with 4 additions and 1 deletions
|
@ -2282,7 +2282,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