Skip to content

Commit

Permalink
fix callable not clearing freed pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
rune-scape committed Jun 3, 2024
1 parent 505da68 commit 4463e7d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/variant/callable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ void Callable::operator=(const Callable &p_callable) {

if (custom->ref_count.unref()) {
memdelete(custom);
custom = nullptr;
}
}

Expand Down Expand Up @@ -428,6 +429,7 @@ Callable::~Callable() {
if (is_custom()) {
if (custom->ref_count.unref()) {
memdelete(custom);
custom = nullptr;
}
}
}
Expand Down

0 comments on commit 4463e7d

Please sign in to comment.