summaryrefslogtreecommitdiff
path: root/src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp
diff options
context:
space:
mode:
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) {