From 6ec773c50addba1a9bdf57590e6b7541c4f004ed Mon Sep 17 00:00:00 2001 From: granzuglia Date: Thu, 17 Oct 2013 17:22:16 +0000 Subject: [PATCH] - added missing upper bound control on vector access by index --- wrap/gl/trimesh.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrap/gl/trimesh.h b/wrap/gl/trimesh.h index 2325c6ab..58a63f08 100644 --- a/wrap/gl/trimesh.h +++ b/wrap/gl/trimesh.h @@ -445,7 +445,7 @@ void DrawFill() if(tm==TMPerWedgeMulti) { curtexname=(*fi).WT(0).n(); - if (curtexname >= 0) + if ((curtexname >= 0) && (curtexname < TMId.size())) { glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D,TMId[curtexname]);