From 45f9cc20d93af4aa3fd5a858db605e2e73986b60 Mon Sep 17 00:00:00 2001 From: Marianne Gagnon Date: Fri, 11 Jul 2014 18:54:35 -0400 Subject: [PATCH] Add asserts to catch issue early --- src/graphics/render.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/graphics/render.cpp b/src/graphics/render.cpp index 1b6e0b8c1..1c092a09d 100644 --- a/src/graphics/render.cpp +++ b/src/graphics/render.cpp @@ -1769,6 +1769,8 @@ static void testSH(unsigned char *color[6], size_t width, size_t height, */ GLuint generateCubeMapFromTextures(const std::vector &textures) { + assert(textures.size() == 6); + GLuint result; glGenTextures(1, &result); @@ -1813,6 +1815,7 @@ void IrrDriver::generateSkyboxCubemap() { glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS); + assert(SkyboxTextures.size() == 6); SkyboxCubeMap = generateCubeMapFromTextures(SkyboxTextures); const unsigned texture_permutation[] = { 2, 3, 0, 1, 5, 4 };