Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 277 vs 278 for /trunk/Source Code/Hardware/Video/OpenGL/Shaders/glShaderProgram.cpp

Diff revisions: vs.
  @@ -394,7 +394,7 @@
394 394
395 395 void glShaderProgram::SetSubroutines(ShaderType type, const vectorImpl<U32>& indices) const {
396 396 DIVIDE_ASSERT(_bound && _linked, "glShaderProgram error: tried to set subroutines on an unbound or unlinked program!");
397 - if (indices[0] != GL_INVALID_INDEX)
397 + if (!indices.empty() && indices[0] != GL_INVALID_INDEX)
398 398 glUniformSubroutinesuiv(_shaderStageTable[type], (GLsizei)indices.size(), &indices.front());
399 399
400 400 }