summaryrefslogtreecommitdiffstats
path: root/core/pool_allocator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/pool_allocator.cpp')
-rw-r--r--core/pool_allocator.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/pool_allocator.cpp b/core/pool_allocator.cpp
index 9b342ef913..48a30f6702 100644
--- a/core/pool_allocator.cpp
+++ b/core/pool_allocator.cpp
@@ -539,6 +539,10 @@ void PoolAllocator::unlock(ID p_mem) {
return;
mt_lock();
Entry *e = get_entry(p_mem);
+ if (!e) {
+ mt_unlock();
+ ERR_FAIL_COND(!e);
+ }
if (e->lock == 0) {
mt_unlock();
ERR_PRINT("e->lock == 0");