[Mesa-dev] [PATCH 20/20] i965: Handle miptree creation failure in intel_alloc_texture_storage()
Juha-Pekka Heikkila
juhapekka.heikkila at gmail.com
Wed May 14 10:56:06 PDT 2014
Check intel_miptree_create() return value before using it as
a pointer.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
---
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 f18ca45..556b787 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++) {
--
1.8.1.2
More information about the mesa-dev
mailing list