diff options
| author | Léo Lam <leo@leolam.fr> | 2020-08-20 11:02:45 +0200 |
|---|---|---|
| committer | Léo Lam <leo@leolam.fr> | 2020-08-20 11:02:45 +0200 |
| commit | 7e96f826c09cc49a52fe03c765141a8f295b1091 (patch) | |
| tree | 0af0e360ae59f824ecf5cec7b411b3abb15d72cb /src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp | |
| parent | 0dc07525309ecc1d522fa4f18ecb09993b035f2b (diff) | |
ksys/act: Fix ~ActorLinkConstDataAccess
Diffstat (limited to 'src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp')
| -rw-r--r-- | src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp | 7 |
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) { |
