summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/bind/core_bind.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index da7b15da94..242c5b3bf1 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -2700,6 +2700,8 @@ Variant _Thread::wait_to_finish() {
target_method = StringName();
target_instance = NULL;
userdata = Variant();
+ if (thread)
+ memdelete(thread);
thread = NULL;
return r;