mirror of
https://github.com/godotengine/godot.git
synced 2025-11-02 06:31:13 +00:00
Fix unsafe uses of Callable.is_null()
`Callable.is_null()` is not equivalent to `!Callable.is_valid()` and doesn't guarantee the call is valid.
This commit is contained in:
parent
6118592c6d
commit
31e7ee63f2
19 changed files with 40 additions and 40 deletions
|
|
@ -198,7 +198,7 @@ void Utilities::visibility_notifier_call(RID p_notifier, bool p_enter, bool p_de
|
|||
ERR_FAIL_NULL(vn);
|
||||
|
||||
if (p_enter) {
|
||||
if (!vn->enter_callback.is_null()) {
|
||||
if (vn->enter_callback.is_valid()) {
|
||||
if (p_deferred) {
|
||||
vn->enter_callback.call_deferred();
|
||||
} else {
|
||||
|
|
@ -206,7 +206,7 @@ void Utilities::visibility_notifier_call(RID p_notifier, bool p_enter, bool p_de
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (!vn->exit_callback.is_null()) {
|
||||
if (vn->exit_callback.is_valid()) {
|
||||
if (p_deferred) {
|
||||
vn->exit_callback.call_deferred();
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue