EMI: Don't allow setTex with out of range index

This commit is contained in:
Dries Harnie
2012-09-01 17:32:55 +02:00
parent bb68fff2b5
commit ae24f4f8bb
+1 -1
View File
@@ -88,7 +88,7 @@ EMIMeshFace::~EMIMeshFace() {
}
void EMIModel::setTex(int index) {
if (_mats[index])
if (index < _numTextures && _mats[index])
_mats[index]->select();
}