summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2008-12-12 10:02:05 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2008-12-12 10:02:05 +0800
commit8b69c42b356d51c3a37bc0af41738b016c2adc5b (patch)
treeaa24f8587c368db1d2b4051d51244e57d36d3ad4 /src/mesa/drivers/dri/intel/intel_mipmap_tree.c
parentc8b505d8260cccf289c947c629471df8f5c81c0d (diff)
intel: check for null texture. (fix #13902)
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_mipmap_tree.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index b96ba72853..c677ddd63c 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -111,9 +111,9 @@ intel_miptree_create(struct intel_context *intel,
first_level, last_level, width0,
height0, depth0, cpp, compress_byte);
/*
- * pitch == 0 indicates the null texture
+ * pitch == 0 || height == 0 indicates the null texture
*/
- if (!mt || !mt->pitch)
+ if (!mt || !mt->pitch || !mt->total_height)
return NULL;
mt->region = intel_region_alloc(intel,