diff --git a/.pick_status.json b/.pick_status.json index 7047276876a..e818c54e27b 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -508,7 +508,7 @@ "description": "mesa: don't crash on incorrect texture use", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c index 8f08396fe15..b73413ee51f 100644 --- a/src/mesa/main/mipmap.c +++ b/src/mesa/main/mipmap.c @@ -1913,6 +1913,10 @@ _mesa_prepare_mipmap_levels(struct gl_context *ctx, { 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; diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 6b269196167..64b9009552d 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -2751,7 +2751,8 @@ st_finalize_texture(struct gl_context *ctx, 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