mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 13:33:30 +02:00
Fixing potential access to null object
This commit is contained in:
parent
7fecd3261d
commit
fd1cfadc47
1 changed files with 10 additions and 8 deletions
|
@ -568,15 +568,17 @@ bool EntityScriptingInterface::actionWorker(const QUuid& entityID,
|
||||||
});
|
});
|
||||||
|
|
||||||
// transmit the change
|
// transmit the change
|
||||||
EntityItemProperties properties;
|
if (success) {
|
||||||
_entityTree->withReadLock([&] {
|
EntityItemProperties properties;
|
||||||
properties = entity->getProperties();
|
_entityTree->withReadLock([&] {
|
||||||
});
|
properties = entity->getProperties();
|
||||||
|
});
|
||||||
|
|
||||||
properties.setActionDataDirty();
|
properties.setActionDataDirty();
|
||||||
auto now = usecTimestampNow();
|
auto now = usecTimestampNow();
|
||||||
properties.setLastEdited(now);
|
properties.setLastEdited(now);
|
||||||
queueEntityMessage(PacketType::EntityEdit, entityID, properties);
|
queueEntityMessage(PacketType::EntityEdit, entityID, properties);
|
||||||
|
}
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue