[Mesa-dev] [PATCH 1/2] intel: fix potential segfault error
Kenneth Graunke
kenneth at whitecape.org
Tue Nov 1 10:25:29 PDT 2011
On 11/01/2011 02:57 AM, Yuanhan Liu wrote:
> Signed-off-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
> ---
> src/mesa/drivers/dri/intel/intel_tex_validate.c | 6 ++++--
> 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 4012400..e2b8699 100644
> --- a/src/mesa/drivers/dri/intel/intel_tex_validate.c
> +++ b/src/mesa/drivers/dri/intel/intel_tex_validate.c
> @@ -132,14 +132,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 ||
Patch 1/2 is:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
More information about the mesa-dev
mailing list