diff options
author | Patrice Mandin <patmandin@gmail.com> | 2009-02-10 22:04:56 +0100 |
---|---|---|
committer | Patrice Mandin <patmandin@gmail.com> | 2009-02-10 22:04:56 +0100 |
commit | 7b66b24c2ea127aa8f58f38a0cf4e834b58c2aa7 (patch) | |
tree | d616468841fe4b3f6ff722217bc62aff345bf05e /src/gallium | |
parent | 53069cbf290c7de7cc1bf813815e8ef7d5d886a4 (diff) |
nouveau: stop with 0 dimension
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/nv04/nv04_surface_2d.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv04/nv04_surface_2d.c b/src/gallium/drivers/nv04/nv04_surface_2d.c index d220c21c49..ffb17ea4ca 100644 --- a/src/gallium/drivers/nv04/nv04_surface_2d.c +++ b/src/gallium/drivers/nv04/nv04_surface_2d.c @@ -130,7 +130,7 @@ nv04_surface_copy_swizzle(struct nv04_surface_2d *ctx, /* FIXME: Find right src and dst offset, given mipmap level */ level_w = w; level_h = h; - for (i=0; i<src->level; i++) { + for (i=0; i<src->level && level_w && level_h; i++) { dst_offset += level_w * level_h * dst->block.size; level_w >>= 1; level_h >>= 1; |