From a95426e7c4e31813c29d413c8c59d7e644201f0b Mon Sep 17 00:00:00 2001 From: akallabeth Date: Sun, 21 Apr 2024 12:34:39 +0200 Subject: [PATCH] [core,update] return if gdi is NULL --- libfreerdp/core/update.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libfreerdp/core/update.c b/libfreerdp/core/update.c index 53e0f9c7a..5d40385a5 100644 --- a/libfreerdp/core/update.c +++ b/libfreerdp/core/update.c @@ -3331,7 +3331,9 @@ BOOL update_begin_paint(rdpUpdate* update) /* Reset the invalid regions, we start a new frame here. */ rdpGdi* gdi = update->context->gdi; - WINPR_ASSERT(gdi); + if (!gdi) + return FALSE; + if (gdi->hdc && gdi->primary && gdi->primary->hdc) { HGDI_WND hwnd = gdi->primary->hdc->hwnd;