From: Juha-Pekka Heikkila Date: Mon, 12 May 2014 12:25:59 +0000 (+0300) Subject: i965: Handle miptree creation failure in intel_alloc_texture_storage() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=78a89d6fa0c0fa35d7d14e50c2f4987ec411afd8;p=mesa.git i965: Handle miptree creation failure in intel_alloc_texture_storage() Check intel_miptree_create() return value before using it as a pointer. Signed-off-by: Juha-Pekka Heikkila Reviewed-by: Ian Romanick --- diff --git a/src/mesa/drivers/dri/i965/intel_tex.c b/src/mesa/drivers/dri/i965/intel_tex.c index f18ca456471..556b787c3fc 100644 --- a/src/mesa/drivers/dri/i965/intel_tex.c +++ b/src/mesa/drivers/dri/i965/intel_tex.c @@ -147,6 +147,9 @@ intel_alloc_texture_storage(struct gl_context *ctx, num_samples, INTEL_MIPTREE_TILING_ANY); + if (intel_texobj->mt == NULL) { + return false; + } } for (face = 0; face < numFaces; face++) {