diff --git a/plugins/rdp/vinagre-rdp-tab.c b/plugins/rdp/vinagre-rdp-tab.c
index b731f9b..7c806bf 100644
--- a/plugins/rdp/vinagre-rdp-tab.c
+++ b/plugins/rdp/vinagre-rdp-tab.c
@@ -574,45 +574,49 @@ frdp_pre_connect (freerdp *instance)
   settings->order_support[NEG_POLYGON_CB_INDEX] = false;
   settings->order_support[NEG_ELLIPSE_SC_INDEX] = false;
   settings->order_support[NEG_ELLIPSE_CB_INDEX] = false;
 #endif
 
   return TRUE;
 }
 
 static BOOL
 frdp_post_connect (freerdp *instance)
 {
   VinagreRdpTab        *rdp_tab = ((frdpContext *) instance->context)->rdp_tab;
   VinagreRdpTabPrivate *priv = rdp_tab->priv;
   rdpGdi               *gdi;
   int                   stride;
 
   gdi_init (instance,
 #if defined(FREERDP_VERSION_MAJOR) && defined(FREERDP_VERSION_MINOR) && \
     !(FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 && \
     FREERDP_VERSION_MINOR >= 2))
-                    CLRBUF_24BPP,
+                    CLRBUF_24BPP, NULL
 #else
-                    CLRBUF_32BPP,
+#ifdef CLRBUF_32BPP
+                    CLRBUF_32BPP, NULL
+#else
+                    PIXEL_FORMAT_BGRA32
+#endif
 #endif
-                    NULL);
+                    );
   gdi = instance->context->gdi;
 
   instance->update->BeginPaint = frdp_begin_paint;
   instance->update->EndPaint = frdp_end_paint;
 
   stride = cairo_format_stride_for_width (CAIRO_FORMAT_RGB24, gdi->width);
   rdp_tab->priv->surface = cairo_image_surface_create_for_data ((unsigned char*) gdi->primary_buffer,
                                                                 CAIRO_FORMAT_RGB24,
                                                                 gdi->width,
                                                                 gdi->height,
                                                                 stride);
   gtk_widget_queue_draw_area (priv->display,
                               0, 0,
                               gdi->width, gdi->height);
 
   vinagre_tab_save_credentials_in_keyring (VINAGRE_TAB (rdp_tab));
   vinagre_tab_add_recent_used (VINAGRE_TAB (rdp_tab));
   vinagre_tab_set_state (VINAGRE_TAB (rdp_tab), VINAGRE_TAB_STATE_CONNECTED);
 
   return TRUE;
