diff --git a/src/EterGrnLib/Model.cpp b/src/EterGrnLib/Model.cpp index 968f838..6f9fa18 100644 --- a/src/EterGrnLib/Model.cpp +++ b/src/EterGrnLib/Model.cpp @@ -257,7 +257,7 @@ BOOL CGrannyModel::CheckMeshIndex(int iIndex) const { if (iIndex < 0) return FALSE; - if (iIndex >= m_meshNodeSize) + if (iIndex >= GetMeshCount()) return FALSE; return TRUE;