From 7b9fa8fbe5c6232564d8b4d0a02b2548e267aa44 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Fri, 24 Jul 2015 20:00:25 +0200 Subject: [PATCH] gsdx-ogl: add an assertion that will save me --- plugins/GSdx/GSDeviceOGL.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/GSdx/GSDeviceOGL.cpp b/plugins/GSdx/GSDeviceOGL.cpp index ae981734c9..4fd0276492 100644 --- a/plugins/GSdx/GSDeviceOGL.cpp +++ b/plugins/GSdx/GSDeviceOGL.cpp @@ -1273,6 +1273,7 @@ void GSDeviceOGL::IASetPrimitiveTopology(GLenum topology) void GSDeviceOGL::PSSetShaderResource(int i, GSTexture* sr) { + ASSERT(i < (int)countof(GLState::tex_unit)); GLuint id = sr ? sr->GetID() : 0; if (GLState::tex_unit[i] != id) { GLState::tex_unit[i] = id;