Skip to content

Commit

Permalink
Merge pull request godotengine#92722 from rune-scape/fix-callable-crash
Browse files Browse the repository at this point in the history
Fix callable not clearing freed pointer
  • Loading branch information
akien-mga authored Jun 4, 2024
2 parents 7c2d65f + 4463e7d commit 7b63ac4
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 7b63ac4

Please sign in to comment.