From 0a80f4d224b7f2a4b40cafc9d36bbe56f267cce9 Mon Sep 17 00:00:00 2001 From: Adam Scott Date: Sun, 12 Jan 2025 12:09:53 -0500 Subject: [PATCH] Fix the use of `Object::_instance_bindings` when GDExtensions uninit --- core/object/object.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/object/object.cpp b/core/object/object.cpp index f64b4e3c379..430c30b8c44 100644 --- a/core/object/object.cpp +++ b/core/object/object.cpp @@ -2159,6 +2159,9 @@ Object::~Object() { for (uint32_t i = 0; i < _instance_binding_count; i++) { gdextension_manager->untrack_instance_binding(_instance_bindings[i].token, this); } + } else { + memfree(_instance_bindings); + _instance_bindings = nullptr; } } #endif