From 31e7ee63f21e7b86d41cdb724824d4dc0804f281 Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Sat, 27 Apr 2024 11:56:39 +0200 Subject: 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. --- platform/ios/display_server_ios.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'platform/ios') diff --git a/platform/ios/display_server_ios.mm b/platform/ios/display_server_ios.mm index cd6f855d77..62bc55dce8 100644 --- a/platform/ios/display_server_ios.mm +++ b/platform/ios/display_server_ios.mm @@ -218,7 +218,7 @@ void DisplayServerIOS::send_window_event(DisplayServer::WindowEvent p_event) con } void DisplayServerIOS::_window_callback(const Callable &p_callable, const Variant &p_arg) const { - if (!p_callable.is_null()) { + if (p_callable.is_valid()) { p_callable.call(p_arg); } } -- cgit v1.2.3