You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +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:
@@ -86,7 +86,7 @@ private:
|
||||
}
|
||||
|
||||
void _send_window_event(WindowEvent p_event) {
|
||||
if (!event_callback.is_null()) {
|
||||
if (event_callback.is_valid()) {
|
||||
Variant event = int(p_event);
|
||||
event_callback.call(event);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user