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) {