mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 02:21:15 +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
|
|
@ -326,7 +326,7 @@ void DisplayServerAndroid::window_set_drop_files_callback(const Callable &p_call
|
|||
}
|
||||
|
||||
void DisplayServerAndroid::_window_callback(const Callable &p_callable, const Variant &p_arg, bool p_deferred) const {
|
||||
if (!p_callable.is_null()) {
|
||||
if (p_callable.is_valid()) {
|
||||
if (p_deferred) {
|
||||
p_callable.call_deferred(p_arg);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue