cell: check for NULL shader pointer in cell_bind_vs_state()
authorBrian <brian.paul@tungstengraphics.com>
Wed, 12 Mar 2008 02:03:37 +0000 (20:03 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Wed, 12 Mar 2008 02:03:37 +0000 (20:03 -0600)
src/gallium/drivers/cell/ppu/cell_state_shader.c

index 935501441b1655d78e6c570f958f07fd27139f2d..269a5c15bac44359a9827a6aa1154c0fafbe377d 100644 (file)
@@ -131,7 +131,8 @@ cell_bind_vs_state(struct pipe_context *pipe, void *vs)
 
    cell->vs = (const struct cell_vertex_shader_state *) vs;
 
-   draw_bind_vertex_shader(cell->draw, cell->vs->draw_data);
+   draw_bind_vertex_shader(cell->draw,
+                           (cell->vs ? cell->vs->draw_data : NULL));
 
    cell->dirty |= CELL_NEW_VS;
 }