fix nouveau_wfb_finish_wrap

Signed-off-by: David Heidelberger <d.okias@gmail.com> 

---

--- a/src/nouveau_wfb.c	2009-06-24 22:25:08.194397342 +0200
+++ b/src/nouveau_wfb.c	2009-06-24 22:24:40.466647335 +0200
@@ -175,20 +175,19 @@ nouveau_wfb_setup_wrap(ReadMemoryProcPtr
 void
 nouveau_wfb_finish_wrap(DrawablePtr pDraw)
 {
-	struct wfb_pixmap *wfb = &wfb_pixmap[0];
+	struct wfb_pixmap *wfb;
 	PixmapPtr ppix;
-	int i;
+	int wrap;
 
 	ppix = NVGetDrawablePixmap(pDraw);
 	if (!ppix)
 		return;
 
-	for (i = 0; i < 6; i++) {
-		if (wfb->ppix != ppix)
-			continue;
-
+	wrap = 0;
+	while(wfb_pixmap[wrap].ppix) {
+		wfb = &wfb_pixmap[wrap];
 		wfb->ppix = NULL;
-		break;
+		wrap++;
 	}
 }
 
