diff --git a/code/AssetLib/LWO/LWOAnimation.cpp b/code/AssetLib/LWO/LWOAnimation.cpp index 49fa45746..c2ee2d9c0 100644 --- a/code/AssetLib/LWO/LWOAnimation.cpp +++ b/code/AssetLib/LWO/LWOAnimation.cpp @@ -83,9 +83,13 @@ AnimResolver::AnimResolver(std::list &_envelopes, double tick) : (*it).old_first = 0; (*it).old_last = (*it).keys.size() - 1; - if ((*it).keys.empty()) continue; + if ((*it).keys.empty()) { + continue; + } + if ((int)(*it).type < 1 || (int)(*it).type>EnvelopeType_Unknown) { + continue; + } switch ((*it).type) { - // translation case LWO::EnvelopeType_Position_X: trans_x = &*it;