From 78a89d6fa0c0fa35d7d14e50c2f4987ec411afd8 Mon Sep 17 00:00:00 2001 From: Juha-Pekka Heikkila Date: Mon, 12 May 2014 15:25:59 +0300 Subject: [PATCH] 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 --- src/mesa/drivers/dri/i965/intel_tex.c | 3 +++ 1 file changed, 3 insertions(+) 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++) { -- 2.30.2