diff options
author | Juha-Pekka Heikkila <[email protected]> | 2014-05-12 15:25:59 +0300 |
---|---|---|
committer | Ville Syrjälä <[email protected]> | 2014-06-26 15:37:14 +0300 |
commit | 78a89d6fa0c0fa35d7d14e50c2f4987ec411afd8 (patch) | |
tree | 822f0c63eec16672c32f114343095ec36a89a7b1 /src/mesa/drivers | |
parent | 375943bc0a99bec6e4d07b07acd0e9004b2a9ea0 (diff) |
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 <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_tex.c | 3 |
1 files changed, 3 insertions, 0 deletions
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++) { |