From 537d5c4934451f948acc13887e17f9047dd6d3e5 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 23 Jul 2013 04:36:25 -0700 Subject: [PATCH] Avoid trying to play animations without any animation sources --- apps/openmw/mwrender/animation.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwrender/animation.cpp b/apps/openmw/mwrender/animation.cpp index a8328b7cbf..956bc6f7dd 100644 --- a/apps/openmw/mwrender/animation.cpp +++ b/apps/openmw/mwrender/animation.cpp @@ -554,7 +554,7 @@ bool Animation::handleTextKey(AnimState &state, const std::string &groupname, co void Animation::play(const std::string &groupname, int priority, int groups, bool autodisable, float speedmult, const std::string &start, const std::string &stop, float startpoint, size_t loops) { - if(!mSkelBase) + if(!mSkelBase || mAnimSources.size() == 0) return; if(groupname.empty()) @@ -602,7 +602,7 @@ void Animation::play(const std::string &groupname, int priority, int groups, boo } } if(iter == mAnimSources.rend()) - std::cerr<< "Failed to find animation "< &animsrc = state->second.mSource; - const std::vector >&ctrls = animsrc->mControllers[0]; for(size_t i = 0;i < ctrls.size();i++) {