summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_lambda_callable.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-11-23 22:57:25 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-11-23 22:57:25 +0100
commit070ac8dfcd48d299a81e7a0752682a5b704c53b0 (patch)
tree44bc19b92150aaedb42ff069d26ff35f743551b2 /modules/gdscript/gdscript_lambda_callable.cpp
parentbb63963486a389d4417ba13249a40219f3774df0 (diff)
parentbfe66ab7cd73279d078d73b925573745031a9e62 (diff)
downloadredot-engine-070ac8dfcd48d299a81e7a0752682a5b704c53b0.tar.gz
Merge pull request #85248 from RandomShaper/fix_gdlamb_doublefree_2
Fix lambda cross-thread dynamics (take 2)
Diffstat (limited to 'modules/gdscript/gdscript_lambda_callable.cpp')
-rw-r--r--modules/gdscript/gdscript_lambda_callable.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/gdscript/gdscript_lambda_callable.cpp b/modules/gdscript/gdscript_lambda_callable.cpp
index 339d1ac08e..547f5607d3 100644
--- a/modules/gdscript/gdscript_lambda_callable.cpp
+++ b/modules/gdscript/gdscript_lambda_callable.cpp
@@ -296,7 +296,5 @@ GDScriptLambdaSelfCallable::GDScriptLambdaSelfCallable(Object *p_self, GDScriptF
}
GDScriptLambdaSelfCallable::~GDScriptLambdaSelfCallable() {
- if (updatable_func_ptr_element) {
- GDScript::_remove_func_ptr_to_update(updatable_func_ptr_element);
- }
+ GDScript::_remove_func_ptr_to_update(updatable_func_ptr_element);
}