From 7791c2349d9d68453dcb11e25b19b543bce5f667 Mon Sep 17 00:00:00 2001 From: Corentin SORIANO Date: Mon, 4 Nov 2024 21:32:39 +0100 Subject: [PATCH] GUACAMOLE-1997: Fix issue on screen resize with freerdp >= 3.8.0. --- src/protocols/rdp/gdi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/protocols/rdp/gdi.c b/src/protocols/rdp/gdi.c index 69373faf9..5956df23c 100644 --- a/src/protocols/rdp/gdi.c +++ b/src/protocols/rdp/gdi.c @@ -99,7 +99,10 @@ BOOL guac_rdp_gdi_end_paint(rdpContext* context) { guac_display_layer* default_layer = guac_display_default_layer(rdp_client->display); guac_display_layer_raw_context* current_context = rdp_client->current_context; - GUAC_ASSERT(current_context != NULL); + + /* Handle the case where EndPaint was called without BeginPaint */ + if (current_context == NULL) + return TRUE; /* Ignore paint if GDI output is suppressed */ if (gdi->suppressOutput)