corentin-soriano commented on code in PR #594:
URL: https://github.com/apache/guacamole-server/pull/594#discussion_r2115438951


##########
src/protocols/rdp/gdi.c:
##########
@@ -159,7 +159,17 @@ BOOL guac_rdp_gdi_desktop_resize(rdpContext* context) {
     int width = guac_rdp_get_width(context->instance);
     int height = guac_rdp_get_height(context->instance);
 
-    GUAC_ASSERT(rdp_client->current_context == NULL);
+    int major;
+    int minor;
+    int revision;
+    freerdp_get_version(&major, &minor, &revision);
+
+    /* For FreeRDP versions prior to 3.8.0, EndPaint will not be called in
+     * `gdi_resize()`, so the current context should be NULL. If it is not
+     * NULL, it means that the current context is still open, and therefore the
+     * GDI buffer has not been flushed yet. */
+    if (major < 3 || (major == 3 && minor < 8))
+        GUAC_ASSERT(rdp_client->current_context == NULL);

Review Comment:
   Done!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to