keyboard: Don't check text input on a null window
Build (All) / Create test plan (push) Waiting to run
Build (All) / level1 (push) Blocked by required conditions
Build (All) / level2 (push) Blocked by required conditions

(cherry picked from commit c3a3a11db4)
This commit is contained in:
Cameron Gutman
2025-03-23 16:48:16 -05:00
parent d8837edfa2
commit f03572335a
+3 -3
View File
@@ -747,7 +747,7 @@ void SDL_SendKeyboardText(const char *text)
{
SDL_Keyboard *keyboard = &SDL_keyboard;
if (!SDL_TextInputActive(keyboard->focus)) {
if (!keyboard->focus || !SDL_TextInputActive(keyboard->focus)) {
return;
}
@@ -778,7 +778,7 @@ void SDL_SendEditingText(const char *text, int start, int length)
{
SDL_Keyboard *keyboard = &SDL_keyboard;
if (!SDL_TextInputActive(keyboard->focus)) {
if (!keyboard->focus || !SDL_TextInputActive(keyboard->focus)) {
return;
}
@@ -838,7 +838,7 @@ void SDL_SendEditingTextCandidates(char **candidates, int num_candidates, int se
{
SDL_Keyboard *keyboard = &SDL_keyboard;
if (!SDL_TextInputActive(keyboard->focus)) {
if (!keyboard->focus || !SDL_TextInputActive(keyboard->focus)) {
return;
}