Yeah, this is correct. The pointer will be NULL if there is no shader
for that stage.
Reviewed-by: Ian Romanick <[email protected]>
(Sent from my phone.)
On Oct 9, 2011, at 5:13 PM, Stéphane Marchesin <[email protected]>
wrote:
The rest of the linker/glsl translation code checks for NULL, so I
suppose we should check here too. Fixes crash on exit with i915g
instanced drawing.
---
src/mesa/state_tracker/st_program.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/
state_tracker/st_program.c
index acd3b56..c419c40 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -1154,7 +1154,8 @@ destroy_shader_program_variants_cb(GLuint key,
void *data, void *userData)
}
for (i = 0; i < Elements(shProg->_LinkedShaders); i++) {
- destroy_program_variants(st, shProg->_LinkedShaders[i]-
>Program);
+ if (shProg->_LinkedShaders[i])
+ destroy_program_variants(st, shProg->_LinkedShaders
[i]->Program);
}
}
break;
--
1.7.5.4
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev