From: Patrice Mandin Date: Tue, 10 Feb 2009 21:04:56 +0000 (+0100) Subject: nouveau: stop with 0 dimension X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7b66b24c2ea127aa8f58f38a0cf4e834b58c2aa7;p=mesa.git nouveau: stop with 0 dimension --- diff --git a/src/gallium/drivers/nv04/nv04_surface_2d.c b/src/gallium/drivers/nv04/nv04_surface_2d.c index d220c21c49d..ffb17ea4cac 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; ilevel; i++) { + for (i=0; ilevel && level_w && level_h; i++) { dst_offset += level_w * level_h * dst->block.size; level_w >>= 1; level_h >>= 1;