diff --git a/cogl/winsys/cogl-winsys-egl.c b/cogl/winsys/cogl-winsys-egl.c index d4f83ac33..08cd354a9 100644 --- a/cogl/winsys/cogl-winsys-egl.c +++ b/cogl/winsys/cogl-winsys-egl.c @@ -1100,11 +1100,13 @@ gdl_plane_init (CoglDisplay *display, GError **error) /* Default to triple buffering if we don't have an onscreen template */ if (rc == GDL_SUCCESS) - if (display->onscreen_template) - rc = gdl_plane_set_uint (GDL_PLANE_NUM_GFX_SURFACES, - display->onscreen_template->swap_chain->length); - else - rc = gdl_plane_set_uint (GDL_PLANE_NUM_GFX_SURFACES, 3); + { + if (display->onscreen_template) + rc = gdl_plane_set_uint (GDL_PLANE_NUM_GFX_SURFACES, + display->onscreen_template->swap_chain->length); + else + rc = gdl_plane_set_uint (GDL_PLANE_NUM_GFX_SURFACES, 3); + } if (rc == GDL_SUCCESS) rc = gdl_plane_config_end (GDL_FALSE);