Skip to content

Commit

Permalink
EMI: Don't allow setTex with out of range index
Browse files Browse the repository at this point in the history
  • Loading branch information
Botje committed Sep 1, 2012
1 parent bb68fff commit ae24f4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engines/grim/emi/modelemi.cpp
Expand Up @@ -88,7 +88,7 @@ EMIMeshFace::~EMIMeshFace() {
}

void EMIModel::setTex(int index) {
if (_mats[index])
if (index < _numTextures && _mats[index])
_mats[index]->select();
}

Expand Down

0 comments on commit ae24f4f

Please sign in to comment.