diff --git a/cogl/cogl/driver/gl/cogl-texture-2d-gl.c b/cogl/cogl/driver/gl/cogl-texture-2d-gl.c index cee284c0c..749c9941f 100644 --- a/cogl/cogl/driver/gl/cogl-texture-2d-gl.c +++ b/cogl/cogl/driver/gl/cogl-texture-2d-gl.c @@ -567,6 +567,8 @@ _cogl_texture_2d_gl_copy_from_bitmap (CoglTexture2D *tex_2d, &gl_format, &gl_type); + _cogl_texture_gl_maybe_update_max_level (tex, level); + status = ctx->texture_driver->upload_subregion_to_gl (ctx, tex, src_x, src_y, @@ -580,8 +582,6 @@ _cogl_texture_2d_gl_copy_from_bitmap (CoglTexture2D *tex_2d, cogl_object_unref (upload_bmp); - _cogl_texture_gl_maybe_update_max_level (tex, level); - return status; }