diff options
| author | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-04-27 11:56:39 +0200 |
|---|---|---|
| committer | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-04-27 16:22:57 +0200 |
| commit | 31e7ee63f21e7b86d41cdb724824d4dc0804f281 (patch) | |
| tree | cd7146d05bd3ac5069083a1ca499f6662c4971b5 /platform/android | |
| parent | 6118592c6d88350d01f74faff6fd49754f84a7d0 (diff) | |
| download | redot-engine-31e7ee63f21e7b86d41cdb724824d4dc0804f281.tar.gz | |
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.
Diffstat (limited to 'platform/android')
| -rw-r--r-- | platform/android/display_server_android.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/android/display_server_android.cpp b/platform/android/display_server_android.cpp index c6f2f82117..9869756be1 100644 --- a/platform/android/display_server_android.cpp +++ b/platform/android/display_server_android.cpp @@ -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 { |
