diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c index cf9b20d05..6b9db047b 100644 --- a/cogl/cogl-framebuffer.c +++ b/cogl/cogl-framebuffer.c @@ -734,6 +734,11 @@ cogl_framebuffer_allocate (CoglFramebuffer *framebuffer, return FALSE; } + if (!cogl_texture_allocate (offscreen->texture, error)) + return FALSE; + + /* NB: it's only after allocating the texture that we will + * determine whether a texture needs slicing... */ if (cogl_texture_is_sliced (offscreen->texture)) { _cogl_set_error (error, COGL_SYSTEM_ERROR, @@ -743,9 +748,6 @@ cogl_framebuffer_allocate (CoglFramebuffer *framebuffer, return FALSE; } - if (!cogl_texture_allocate (offscreen->texture, error)) - return FALSE; - /* Forward the texture format as the internal format of the * framebuffer */ framebuffer->internal_format =