Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4995
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11603>
{
const struct gl_texture_image *baseImage =
_mesa_select_tex_image(texObj, texObj->Target, baseLevel);
+
+ if (baseImage == NULL)
+ return;
+
const GLint border = 0;
GLint width = baseImage->Width;
GLint height = baseImage->Height;
firstImage = st_texture_image_const(stObj->base.Image[cubeMapFace]
[stObj->base.Attrib.BaseLevel]);
- assert(firstImage);
+ if (!firstImage)
+ return false;
/* If both firstImage and stObj point to a texture which can contain
* all active images, favour firstImage. Note that because of the