summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTopi Pohjolainen <topi.pohjolainen@intel.com>2017-06-20 17:36:46 +0300
committerTopi Pohjolainen <topi.pohjolainen@intel.com>2017-07-18 21:35:03 +0300
commit2309363868aaf5821b748042e34b5c827e6cfb00 (patch)
treebcb2d2bedd6366884360379449848f8ab3bcd340
parent0320d9bd845afa1d7ea2305aa0338b7b296f8d3d (diff)
i965/miptree: Check for miptree_create() failures
Rest of the function assumes it always succeeds. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index f48d834324..da454add98 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -889,6 +889,8 @@ intel_miptree_create(struct brw_context *brw,
first_level, last_level,
width0, height0, depth0, num_samples,
layout_flags);
+ if (!mt)
+ return NULL;
/* If the BO is too large to fit in the aperture, we need to use the
* BLT engine to support it. Prior to Sandybridge, the BLT paths can't