Added a if(!TMId.empty()) before attempting to bind a texture id from an empty vector...
This commit is contained in:
parent
6f83d41dbe
commit
ecf5bfeeb2
|
@ -341,7 +341,6 @@ void DrawFill()
|
|||
typename MESH_TYPE::FaceIterator fi;
|
||||
|
||||
typename std::vector<typename MESH_TYPE::FaceType*>::iterator fip;
|
||||
short curtexname=-1;
|
||||
|
||||
if(cm == CMPerMesh)
|
||||
glColor(m->C());
|
||||
|
@ -437,6 +436,7 @@ void DrawFill()
|
|||
}
|
||||
else
|
||||
{
|
||||
short curtexname=-1;
|
||||
if(partial)
|
||||
fp = face_pointers.begin();
|
||||
else
|
||||
|
@ -482,6 +482,7 @@ void DrawFill()
|
|||
if (curtexname >= 0)
|
||||
{
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
if(!TMId.empty())
|
||||
glBindTexture(GL_TEXTURE_2D,TMId[curtexname]);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue