mirror of
https://github.com/godotengine/godot
synced 2024-09-05 18:59:47 +00:00
fix callable not clearing freed pointer
This commit is contained in:
parent
505da68b26
commit
4463e7dee9
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue