intel: check for null texture. (fix #13902)
authorXiang, Haihao <haihao.xiang@intel.com>
Fri, 12 Dec 2008 02:02:05 +0000 (10:02 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Fri, 12 Dec 2008 02:02:05 +0000 (10:02 +0800)
src/mesa/drivers/dri/intel/intel_mipmap_tree.c

index b96ba72853e6a18b4a1a8f804f767fea1a1140ee..c677ddd63c52f204431910b72ae3d2b9b3e8f8dd 100644 (file)
@@ -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,