From: nobled Date: Wed, 11 Aug 2010 20:36:52 +0000 (+0300) Subject: st/dri: Fix segmentation fault in sw drivers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5270deaab682c938e360f0d3b52f35b4027db858;p=mesa.git st/dri: Fix segmentation fault in sw drivers --- diff --git a/src/gallium/state_trackers/dri/sw/drisw.c b/src/gallium/state_trackers/dri/sw/drisw.c index ae96f1b20e2..249ccd7fcf6 100644 --- a/src/gallium/state_trackers/dri/sw/drisw.c +++ b/src/gallium/state_trackers/dri/sw/drisw.c @@ -201,7 +201,7 @@ drisw_allocate_textures(struct dri_drawable *drawable, struct pipe_resource templ; unsigned width, height; boolean resized; - int i; + unsigned i; width = drawable->dPriv->w; height = drawable->dPriv->h; @@ -222,7 +222,7 @@ drisw_allocate_textures(struct dri_drawable *drawable, templ.depth0 = 1; templ.last_level = 0; - for (i = 0; i < ST_ATTACHMENT_COUNT; i++) { + for (i = 0; i < count; i++) { enum pipe_format format; unsigned bind;