diff --git a/cogl/cogl-texture-2d.c b/cogl/cogl-texture-2d.c index b5bbbdf1f..f1ab08023 100644 --- a/cogl/cogl-texture-2d.c +++ b/cogl/cogl-texture-2d.c @@ -286,6 +286,9 @@ _cogl_texture_2d_new_from_bitmap (CoglHandle bmp_handle, g_return_val_if_fail (bmp_handle != COGL_INVALID_HANDLE, COGL_INVALID_HANDLE); + internal_format = _cogl_texture_determine_internal_format (bmp->format, + internal_format); + if (!_cogl_texture_2d_can_create (bmp->width, bmp->height, internal_format)) return COGL_INVALID_HANDLE;