aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2009-05-20 14:00:32 -0700
committerEric Anholt <[email protected]>2009-05-21 10:40:11 -0700
commit467f18f7a5375af9a31031063536c927df3ea70c (patch)
treed208da8f70357ee7ef684df2d6464a87db235931
parent4da58bbab034fb2ef955495445fe377dbce1f411 (diff)
intel: Don't segfault on glGenerateMipmaps of a cube map with one face defined.
This presumably applies to SGIS_generate_mipmaps as well.
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_validate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex_validate.c b/src/mesa/drivers/dri/intel/intel_tex_validate.c
index 05a375e1f3b..b5cb7597d16 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_validate.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_validate.c
@@ -241,7 +241,7 @@ intel_tex_map_level_images(struct intel_context *intel,
struct intel_texture_image *intelImage =
intel_texture_image(intelObj->base.Image[face][level]);
- if (intelImage->mt) {
+ if (intelImage && intelImage->mt) {
intelImage->base.Data =
intel_miptree_image_map(intel,
intelImage->mt,
@@ -268,7 +268,7 @@ intel_tex_unmap_level_images(struct intel_context *intel,
struct intel_texture_image *intelImage =
intel_texture_image(intelObj->base.Image[face][level]);
- if (intelImage->mt) {
+ if (intelImage && intelImage->mt) {
intel_miptree_image_unmap(intel, intelImage->mt);
intelImage->base.Data = NULL;
}