mirror of
https://github.com/overte-org/overte.git
synced 2025-04-24 12:13:36 +02:00
fix clearActions
This commit is contained in:
parent
db580d1e0b
commit
b4537b081f
1 changed files with 5 additions and 1 deletions
|
@ -1426,8 +1426,9 @@ bool EntityItem::clearActions(EntitySimulation* simulation) {
|
|||
action->setOwnerEntity(nullptr);
|
||||
action->removeFromSimulation(simulation);
|
||||
}
|
||||
_actionData = QByteArray();
|
||||
_objectActionsLock.unlock();
|
||||
return serializeActionData();
|
||||
return true;
|
||||
}
|
||||
|
||||
void EntityItem::setActionData(QByteArray actionData) {
|
||||
|
@ -1497,7 +1498,10 @@ bool EntityItem::serializeActionData() {
|
|||
_objectActionsLock.lockForRead();
|
||||
if (_objectActions.size() == 0) {
|
||||
_objectActionsLock.unlock();
|
||||
_objectActionsLock.lockForWrite();
|
||||
_actionData = QByteArray();
|
||||
_objectActionsLock.unlock();
|
||||
return true;
|
||||
}
|
||||
|
||||
QVector<QByteArray> serializedActions;
|
||||
|
|
Loading…
Reference in a new issue