summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_surfaces.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/util/u_surfaces.c')
-rw-r--r--src/gallium/auxiliary/util/u_surfaces.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_surfaces.c b/src/gallium/auxiliary/util/u_surfaces.c
index b5d21570d57..f6e5801ef65 100644
--- a/src/gallium/auxiliary/util/u_surfaces.c
+++ b/src/gallium/auxiliary/util/u_surfaces.c
@@ -99,7 +99,7 @@ util_surfaces_destroy(struct util_surfaces *us, struct pipe_resource *pt, void (
if(us->u.array)
{
unsigned i;
- for(i = 0; i < pt->last_level; ++i)
+ for(i = 0; i <= pt->last_level; ++i)
{
struct pipe_surface *ps = us->u.array[i];
if(ps)