- added missing upper bound control on vector access by index

This commit is contained in:
granzuglia 2013-10-17 17:22:16 +00:00
parent d59e519e8f
commit 6ec773c50a
1 changed files with 1 additions and 1 deletions

View File

@ -445,7 +445,7 @@ void DrawFill()
if(tm==TMPerWedgeMulti) if(tm==TMPerWedgeMulti)
{ {
curtexname=(*fi).WT(0).n(); curtexname=(*fi).WT(0).n();
if (curtexname >= 0) if ((curtexname >= 0) && (curtexname < TMId.size()))
{ {
glEnable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D,TMId[curtexname]); glBindTexture(GL_TEXTURE_2D,TMId[curtexname]);