From 3ca3bd197f421e2d5a73f0fd0827dc9a8cb991b5 Mon Sep 17 00:00:00 2001 From: matt335672 <30179339+matt335672@users.noreply.github.com> Date: Thu, 15 Feb 2024 11:23:46 +0000 Subject: [PATCH] Prevent EGFX drawing while channel is down Clear egfx_up as soon as the channel starts to close so that xrdp_mm_draw_dirty() doesn't send data to a closed channel. --- xrdp/xrdp_mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c index 882dfbd5..650dfb48 100644 --- a/xrdp/xrdp_mm.c +++ b/xrdp/xrdp_mm.c @@ -1699,6 +1699,7 @@ process_display_control_monitor_layout_data(struct xrdp_wm *wm) if (error == 0 && module != 0) { xrdp_egfx_shutdown_close_connection(wm->mm->egfx); + mm->egfx_up = 0; } advance_resize_state_machine(mm, WMRZ_EGFX_CONN_CLOSING); break; @@ -1727,7 +1728,6 @@ process_display_control_monitor_layout_data(struct xrdp_wm *wm) { xrdp_egfx_shutdown_delete(wm->mm->egfx); mm->egfx = NULL; - mm->egfx_up = 0; } advance_resize_state_machine(mm, WMRZ_SERVER_MONITOR_RESIZE); break;