diff options
Diffstat (limited to '')
| -rw-r--r-- | src/LifecycleManager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/LifecycleManager.cpp b/src/LifecycleManager.cpp index bcab4b5..a83c9e1 100644 --- a/src/LifecycleManager.cpp +++ b/src/LifecycleManager.cpp @@ -4,6 +4,8 @@ namespace nt { void LifecycleManager::Monitor(ObjectManager::registry* object) { + if (object != nullptr) + ++object->head->handle_count; } const bool LifecycleManager::Contention(ObjectManager::registry* object) @@ -13,5 +15,7 @@ namespace nt void LifecycleManager::Unmonitor(ObjectManager::registry* object) { + if (object != nullptr && object->head->handle_count > 0) + --object->head->handle_count; } } |
