summaryrefslogtreecommitdiff
path: root/src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2020-08-20 11:02:45 +0200
committerLéo Lam <leo@leolam.fr>2020-08-20 11:02:45 +0200
commit7e96f826c09cc49a52fe03c765141a8f295b1091 (patch)
tree0af0e360ae59f824ecf5cec7b411b3abb15d72cb /src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp
parent0dc07525309ecc1d522fa4f18ecb09993b035f2b (diff)
ksys/act: Fix ~ActorLinkConstDataAccess
Diffstat (limited to 'src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp')
-rw-r--r--src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp b/src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp
index 476482ce..3eda6bcd 100644
--- a/src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp
+++ b/src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp
@@ -4,8 +4,11 @@
namespace ksys::act {
ActorLinkConstDataAccess::~ActorLinkConstDataAccess() {
- if (mAcquired)
- acquire(nullptr);
+ if (mAcquired && mProc)
+ mProc->release();
+
+ mAcquired = false;
+ mProc = nullptr;
}
bool ActorLinkConstDataAccess::acquire(BaseProc* proc) {