From a45e464d6ff0b86074415b75a8cda905b79a6556 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Wed, 10 Jan 2024 17:02:26 +0100 Subject: [PATCH] [client,SDL] check for timer initialized before manipulating SDL timers check if the SDL subsystem was actually initialized. Fixes #9736 --- client/SDL/sdl_disp.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/SDL/sdl_disp.cpp b/client/SDL/sdl_disp.cpp index ec110995d..3735dc15a 100644 --- a/client/SDL/sdl_disp.cpp +++ b/client/SDL/sdl_disp.cpp @@ -293,6 +293,9 @@ UINT sdlDispContext::sendLayout(const rdpMonitor* monitors, size_t nmonitors) BOOL sdlDispContext::addTimer() { + if (SDL_WasInit(SDL_INIT_TIMER) == 0) + return FALSE; + SDL_RemoveTimer(_timer); WLog_Print(_sdl->log, WLOG_TRACE, "adding new display check timer");