summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorYuanhan Liu <[email protected]>2011-11-01 17:41:08 +0800
committerYuanhan Liu <[email protected]>2011-11-02 11:14:53 +0800
commit81d5195a6105606910d0d19ab059962e5712c2e0 (patch)
treed67b45253205aa45f1e83928669986d5481bc1af /src/mesa
parent8524be3fb46e2db6db099d9916dad85f38bfe054 (diff)
intel: fix potential segfault error
Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_validate.c6
1 files changed, 4 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 a657732027a..f4c1a688657 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_validate.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_validate.c
@@ -125,14 +125,16 @@ intel_tex_map_image_for_swrast(struct intel_context *intel,
struct intel_texture_image *intel_image,
GLbitfield mode)
{
- int level = intel_image->base.Base.Level;
- int face = intel_image->base.Base.Face;
+ int level;
+ int face;
struct intel_mipmap_tree *mt;
unsigned int x, y;
if (!intel_image || !intel_image->mt)
return;
+ level = intel_image->base.Base.Level;
+ face = intel_image->base.Base.Face;
mt = intel_image->mt;
if (mt->target == GL_TEXTURE_3D ||