diff --git a/apps/openmw/mwrender/actors.cpp b/apps/openmw/mwrender/actors.cpp index 6f479d877..937bf96b0 100644 --- a/apps/openmw/mwrender/actors.cpp +++ b/apps/openmw/mwrender/actors.cpp @@ -114,7 +114,8 @@ void Actors::removeCell(MWWorld::Ptr::CellStore* store){ } void Actors::playAnimationGroup (const MWWorld::Ptr& ptr, const std::string& groupName, int mode, int number){ - mAllActors.find(ptr)->second->startScript(groupName, mode, number); + if(mAllActors.find(ptr) != mAllActors.end()) + mAllActors[ptr]->startScript(groupName, mode, number); } void Actors::skipAnimation (const MWWorld::Ptr& ptr){ diff --git a/apps/openmw/mwrender/animation.cpp b/apps/openmw/mwrender/animation.cpp index c6fc13a1f..e9d6710be 100644 --- a/apps/openmw/mwrender/animation.cpp +++ b/apps/openmw/mwrender/animation.cpp @@ -354,8 +354,10 @@ namespace MWRender{ for(iter = transformations->begin(); iter != transformations->end(); iter++){ if(time < iter->getStartTime() || time < startTime || time > iter->getStopTime()) { - continue; slot++; + iter++; + continue; + } if(skel->hasBone(iter->getBonename())){