mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
iOS: Prevent startup crash with Input singleton null check
This commit is contained in:
parent
1b37dacc18
commit
fd4d5cc77f
1 changed files with 6 additions and 1 deletions
|
@ -291,7 +291,12 @@ void DisplayServerAppleEmbedded::touch_drag(int p_idx, int p_prev_x, int p_prev_
|
|||
}
|
||||
|
||||
void DisplayServerAppleEmbedded::perform_event(const Ref<InputEvent> &p_event) {
|
||||
Input::get_singleton()->parse_input_event(p_event);
|
||||
Input *input_singleton = Input::get_singleton();
|
||||
if (input_singleton == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
input_singleton->parse_input_event(p_event);
|
||||
}
|
||||
|
||||
void DisplayServerAppleEmbedded::touches_canceled(int p_idx) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue