gallium: assert that we're not deleting the currently bound shader
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 17 Apr 2008 17:13:05 +0000 (11:13 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 17 Apr 2008 17:13:49 +0000 (11:13 -0600)
src/gallium/drivers/softpipe/sp_state_fs.c

index 4eefd1d61f524c1da4e155e83ed913cc23fc128d..2921066ce3640475aadf032a14c69bdb203f24ae 100644 (file)
@@ -82,7 +82,10 @@ softpipe_bind_fs_state(struct pipe_context *pipe, void *fs)
 void
 softpipe_delete_fs_state(struct pipe_context *pipe, void *fs)
 {
+   struct softpipe_context *softpipe = softpipe_context(pipe);
    struct sp_fragment_shader *state = fs;
+
+   assert(fs != softpipe->fs);
    
    state->delete( state );
 }