From a71627226a58fc530e6c8eea32a91ee6df04dc42 Mon Sep 17 00:00:00 2001 From: nillerusr Date: Tue, 15 Mar 2022 15:33:05 +0300 Subject: [PATCH] inputsystem: fix build with older sdl2 versions --- inputsystem/touch_sdl.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/inputsystem/touch_sdl.cpp b/inputsystem/touch_sdl.cpp index 871e285b0b..5e7cf2cf90 100644 --- a/inputsystem/touch_sdl.cpp +++ b/inputsystem/touch_sdl.cpp @@ -20,9 +20,7 @@ int TouchSDLWatcher( void *userInfo, SDL_Event *event ) { CInputSystem *pInputSystem = (CInputSystem *)userInfo; - SDL_Window *window = SDL_GetWindowFromID(event->tfinger.windowID); - if( !window ) - return 0; + if( !event || !pInputSystem ) return 1; switch ( event->type ) { case SDL_FINGERDOWN: