From f4fcf3f96fddf269870fa91c87ad6f4c86c662b5 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Mon, 11 Dec 2023 09:32:17 +0100 Subject: [PATCH] [client,sdl] fix crash #9627 lock SDL context while recreating window structures. --- client/SDL/sdl_freerdp.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/SDL/sdl_freerdp.cpp b/client/SDL/sdl_freerdp.cpp index 5debc604d..360bc8a82 100644 --- a/client/SDL/sdl_freerdp.cpp +++ b/client/SDL/sdl_freerdp.cpp @@ -524,11 +524,13 @@ static BOOL sdl_desktop_resize(rdpContext* context) rdpSettings* settings; auto sdl = get_context(context); + WINPR_ASSERT(sdl); WINPR_ASSERT(context); settings = context->settings; WINPR_ASSERT(settings); + std::lock_guard lock(sdl->critical); gdi = context->gdi; if (!gdi_resize(gdi, freerdp_settings_get_uint32(settings, FreeRDP_DesktopWidth), freerdp_settings_get_uint32(settings, FreeRDP_DesktopHeight)))