Throw error in PSA converter if animation has no frames, as this will lead to a divide-by-zero error in the engine, and it's good to catch that as early as possible.

This was SVN commit r11009.
This commit is contained in:
historic_bruno 2012-02-03 01:49:32 +00:00
parent 0f697afbe3
commit 868b256cce

View File

@ -84,6 +84,7 @@ public:
// Count frames; don't include the last keyframe // Count frames; don't include the last keyframe
size_t frameCount = (size_t)((timeEnd - timeStart) / frameLength - 0.5f); size_t frameCount = (size_t)((timeEnd - timeStart) / frameLength - 0.5f);
REQUIRE(frameCount > 0, "animation must have frames");
// (TODO: sort out the timing/looping problems) // (TODO: sort out the timing/looping problems)
size_t boneCount = skeleton.GetBoneCount(); size_t boneCount = skeleton.GetBoneCount();