mirror of
https://github.com/godotengine/godot.git
synced 2026-01-01 05:49:28 +03:00
Merge pull request #92722 from rune-scape/fix-callable-crash
Fix callable not clearing freed pointer
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user