diff options
-rw-r--r-- | src/mesa/program/program.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/program/program.h b/src/mesa/program/program.h index 135271caf9a..baff473764d 100644 --- a/src/mesa/program/program.h +++ b/src/mesa/program/program.h @@ -216,9 +216,10 @@ _mesa_program_index_to_target(GLuint i) GL_FRAGMENT_PROGRAM_ARB }; STATIC_ASSERT(Elements(enums) == MESA_SHADER_TYPES); - if(i >= MESA_SHADER_TYPES) + if(i >= MESA_SHADER_TYPES) { + assert(!"Unexpected program index"); return 0; - else + } else return enums[i]; } |