svga: Check if vertex elements has been bound before using it.

This commit is contained in:
Michal Krol
2010-03-10 12:04:00 +01:00
parent c282c0b6e4
commit 504ad3606d
@@ -76,6 +76,11 @@ static int update_need_swvfetch( struct svga_context *svga,
unsigned i;
boolean need_swvfetch = FALSE;
if (!svga->curr.velems) {
/* No vertex elements bound. */
return 0;
}
for (i = 0; i < svga->curr.velems->count; i++) {
svga->state.sw.ve_format[i] = svga_translate_vertex_format(svga->curr.velems->velem[i].src_format);
if (svga->state.sw.ve_format[i] == SVGA3D_DECLTYPE_MAX) {