Mesa (master): intel: check for null texture. (fix #13902)
Haihao Xiang
haihao at kemper.freedesktop.org
Fri Dec 12 02:57:38 UTC 2008
Module: Mesa
Branch: master
Commit: 8b69c42b356d51c3a37bc0af41738b016c2adc5b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8b69c42b356d51c3a37bc0af41738b016c2adc5b
Author: Xiang, Haihao <haihao.xiang at intel.com>
Date: Fri Dec 12 10:02:05 2008 +0800
intel: check for null texture. (fix #13902)
---
src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 4 ++--
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 b96ba72..c677ddd 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,
More information about the mesa-commit
mailing list