Module: Mesa
Branch: master
Commit: 42eefb8235437655632b36490f49a3a8fdc69401
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=42eefb8235437655632b36490f49a3a8fdc69401

Author: Zack Rusin <[email protected]>
Date:   Wed Dec 23 12:34:34 2009 -0500

softpipe/gs: don't crash with null shader

---

 src/gallium/drivers/softpipe/sp_state_fs.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/softpipe/sp_state_fs.c 
b/src/gallium/drivers/softpipe/sp_state_fs.c
index 22f82b1..b904bde 100644
--- a/src/gallium/drivers/softpipe/sp_state_fs.c
+++ b/src/gallium/drivers/softpipe/sp_state_fs.c
@@ -221,6 +221,7 @@ softpipe_delete_gs_state(struct pipe_context *pipe, void 
*gs)
    struct sp_geometry_shader *state =
       (struct sp_geometry_shader *)gs;
 
-   draw_delete_geometry_shader(softpipe->draw, state->draw_data);
+   draw_delete_geometry_shader(softpipe->draw,
+                               (state) ? state->draw_data : 0);
    FREE(state);
 }

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to