From 5f0250fb1f852359b9f38c0d73f907d2b4eff7d6 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 30 Apr 2014 12:32:19 -0700 Subject: [PATCH] GUAC-656: Free buffer last - surface needs to send dispose. --- src/protocols/rdp/rdp_bitmap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/protocols/rdp/rdp_bitmap.c b/src/protocols/rdp/rdp_bitmap.c index 28fa6346..daa4d451 100644 --- a/src/protocols/rdp/rdp_bitmap.c +++ b/src/protocols/rdp/rdp_bitmap.c @@ -154,14 +154,14 @@ void guac_rdp_bitmap_free(rdpContext* context, rdpBitmap* bitmap) { guac_layer* buffer = ((guac_rdp_bitmap*) bitmap)->buffer; guac_common_surface* surface = ((guac_rdp_bitmap*) bitmap)->surface; - /* If cached, free buffer */ - if (buffer != NULL) - guac_client_free_buffer(client, buffer); - /* If cached, free surface */ if (surface != NULL) guac_common_surface_free(surface); + /* If cached, free buffer */ + if (buffer != NULL) + guac_client_free_buffer(client, buffer); + } void guac_rdp_bitmap_setsurface(rdpContext* context, rdpBitmap* bitmap, BOOL primary) {