diff options
author | Michel Dänzer <[email protected]> | 2007-10-30 18:36:05 +0100 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2007-10-30 18:40:55 +0100 |
commit | 2f496ff9574ad99f8d85b5d63e97b15faf5aee39 (patch) | |
tree | 300ae6414a48e51559950e5a4befdd09bdf843ef /src/mesa | |
parent | ab3f6015aa7227da3137b60456deb3905680f95f (diff) |
tgsi_translate_mesa_program: Don't crash when program->Parameters == NULL.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_mesa_to_tgsi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index 36b41ea7e89..ab7aa504a1d 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -792,7 +792,8 @@ tgsi_translate_mesa_program( } /* immediates/literals */ - for (i = 0; i < program->Parameters->NumParameters; i++) { + for (i = 0; program->Parameters && i < program->Parameters->NumParameters; + i++) { if (program->Parameters->Parameters[i].Type == PROGRAM_CONSTANT) { struct tgsi_full_immediate fullimm = make_immediate(program->Parameters->ParameterValues[i], |