From 868b256cce6f3a25d3294459e506c2c070a4e35d Mon Sep 17 00:00:00 2001 From: historic_bruno Date: Fri, 3 Feb 2012 01:49:32 +0000 Subject: [PATCH] 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. --- source/collada/PSAConvert.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/collada/PSAConvert.cpp b/source/collada/PSAConvert.cpp index 7d60a8a12e..b90df0303d 100644 --- a/source/collada/PSAConvert.cpp +++ b/source/collada/PSAConvert.cpp @@ -84,6 +84,7 @@ public: // Count frames; don't include the last keyframe size_t frameCount = (size_t)((timeEnd - timeStart) / frameLength - 0.5f); + REQUIRE(frameCount > 0, "animation must have frames"); // (TODO: sort out the timing/looping problems) size_t boneCount = skeleton.GetBoneCount();