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>
This commit is contained in:
Topi Pohjolainen
2017-06-20 17:36:46 +03:00
parent 0320d9bd84
commit 2309363868
@@ -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