Fix a crash. Rasterizer can be null
authorZack Rusin <zack@tungstengraphics.com>
Tue, 22 Apr 2008 22:30:31 +0000 (18:30 -0400)
committerZack Rusin <zack@tungstengraphics.com>
Tue, 22 Apr 2008 22:32:36 +0000 (18:32 -0400)
src/gallium/auxiliary/draw/draw_context.c

index b916b278772712bac1ea31b53e6a281cfa0016a8..db92a53ed28432f2dfc30b9365875e164e301e40 100644 (file)
@@ -122,8 +122,9 @@ void draw_set_rasterizer_state( struct draw_context *draw,
    draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
 
    draw->rasterizer = raster;
-   draw->bypass_clipping = (draw->rasterizer->bypass_clipping || 
-                            draw->driver.bypass_clipping);
+   draw->bypass_clipping =
+      ((draw->rasterizer && draw->rasterizer->bypass_clipping) ||
+       draw->driver.bypass_clipping);
 }