diff options
Diffstat (limited to 'core/variant/callable.cpp')
-rw-r--r-- | core/variant/callable.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/variant/callable.cpp b/core/variant/callable.cpp index c6fbfd93a1..667aae879c 100644 --- a/core/variant/callable.cpp +++ b/core/variant/callable.cpp @@ -324,6 +324,7 @@ void Callable::operator=(const Callable &p_callable) { if (custom->ref_count.unref()) { memdelete(custom); + custom = nullptr; } } @@ -428,6 +429,7 @@ Callable::~Callable() { if (is_custom()) { if (custom->ref_count.unref()) { memdelete(custom); + custom = nullptr; } } } |