From 91127f56ac3cbe409c834a3401546444049d25fe Mon Sep 17 00:00:00 2001 From: hybrid Date: Mon, 6 Jun 2011 14:05:34 +0000 Subject: [PATCH] Avoid crash on non-existent textures git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@3801 dfc29bdd-3216-0410-991c-e03cc46cb475 --- source/Irrlicht/COGLES2Driver.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/Irrlicht/COGLES2Driver.cpp b/source/Irrlicht/COGLES2Driver.cpp index d984b77a..4413e947 100644 --- a/source/Irrlicht/COGLES2Driver.cpp +++ b/source/Irrlicht/COGLES2Driver.cpp @@ -1637,6 +1637,8 @@ namespace video // Filtering has to be set for each texture layer for (u32 i = 0; i < MaxTextureUnits; ++i) { + if (!CurrentTexture[i]) + continue; //Thibault : strange Blue artifact on textures in exemple 02 glActiveTexture(GL_TEXTURE0 + i);