965: fix vb upload size check
authorDave Airlie <airlied@panoply-rh.(none)>
Fri, 18 Apr 2008 05:09:11 +0000 (15:09 +1000)
committerDave Airlie <airlied@panoply-rh.(none)>
Fri, 18 Apr 2008 05:09:46 +0000 (15:09 +1000)
src/mesa/drivers/dri/i965/brw_draw_upload.c

index 9f780bcb97ceaf3919e96abff3e67c0f6dd2ed8d..78677df6c0afc2c99942a771577d051f0b48b64c 100644 (file)
@@ -418,9 +418,11 @@ int brw_prepare_vertices( struct brw_context *brw,
       }
    }
 
-   ret = dri_bufmgr_check_aperture_space(brw->vb.upload.bo);
-   if (ret)
-     return 1;
+   if (brw->vb.upload.bo) {
+     ret = dri_bufmgr_check_aperture_space(brw->vb.upload.bo);
+     if (ret)
+       return 1;
+   }
 
    return 0;
 }