summaryrefslogtreecommitdiffstats
path: root/core/object/object.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/object/object.h')
-rw-r--r--core/object/object.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/object/object.h b/core/object/object.h
index ba6b309542..a96598d12a 100644
--- a/core/object/object.h
+++ b/core/object/object.h
@@ -667,7 +667,7 @@ protected:
_FORCE_INLINE_ bool _instance_binding_reference(bool p_reference) {
bool can_die = true;
if (_instance_bindings) {
- _instance_binding_mutex.lock();
+ MutexLock instance_binding_lock(_instance_binding_mutex);
for (uint32_t i = 0; i < _instance_binding_count; i++) {
if (_instance_bindings[i].reference_callback) {
if (!_instance_bindings[i].reference_callback(_instance_bindings[i].token, _instance_bindings[i].binding, p_reference)) {
@@ -675,7 +675,6 @@ protected:
}
}
}
- _instance_binding_mutex.unlock();
}
return can_die;
}