diff --git a/src/animations/animation_base.cpp b/src/animations/animation_base.cpp index 706361038..0a77b91b9 100644 --- a/src/animations/animation_base.cpp +++ b/src/animations/animation_base.cpp @@ -41,9 +41,10 @@ AnimationBase::AnimationBase(const XMLNode &node) m_playing = true; m_anim_type = ATT_CYCLIC; - if (m_all_ipos.size() == 0) // this will happen for some separate but non-animated objects + if (m_all_ipos.size() == 0) { - m_playing = false; + // Throw to avoid construction completely + throw std::runtime_error("Empty IPO, discard."); } reset(); calculateAnimationDuration(); diff --git a/src/tracks/track_object.cpp b/src/tracks/track_object.cpp index 5bbe2df9c..2aa26613c 100644 --- a/src/tracks/track_object.cpp +++ b/src/tracks/track_object.cpp @@ -371,7 +371,14 @@ void TrackObject::init(const XMLNode &xml_node, scene::ISceneNode* parent, if (type == "animation" || xml_node.hasChildNamed("curve")) { - m_animator = new ThreeDAnimation(xml_node, this); + try + { + m_animator = new ThreeDAnimation(xml_node, this); + } + catch (std::exception& e) + { + Log::debug("TrackObject", e.what()); + } } reset();