From 271511726b02848783904429c8dde857f6266429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Thu, 9 Nov 2023 12:38:01 +0100 Subject: Fixup thread-owned lambda bookkeeping on thread exit --- modules/gdscript/gdscript_lambda_callable.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/gdscript/gdscript_lambda_callable.cpp') diff --git a/modules/gdscript/gdscript_lambda_callable.cpp b/modules/gdscript/gdscript_lambda_callable.cpp index 547f5607d3..339d1ac08e 100644 --- a/modules/gdscript/gdscript_lambda_callable.cpp +++ b/modules/gdscript/gdscript_lambda_callable.cpp @@ -296,5 +296,7 @@ GDScriptLambdaSelfCallable::GDScriptLambdaSelfCallable(Object *p_self, GDScriptF } GDScriptLambdaSelfCallable::~GDScriptLambdaSelfCallable() { - GDScript::_remove_func_ptr_to_update(updatable_func_ptr_element); + if (updatable_func_ptr_element) { + GDScript::_remove_func_ptr_to_update(updatable_func_ptr_element); + } } -- cgit v1.2.3