mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-14 15:53:14 +00:00
keyboard: Don't check text input on a null window
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user