Added handling null dynamic_cast

This commit is contained in:
Robert Osfield
2016-06-24 11:50:07 +01:00
parent f42f6e4fb9
commit f8dd3bc4c5

View File

@@ -358,7 +358,7 @@ void FirstPersonManipulator::moveUp( const double distance )
void FirstPersonManipulator::applyAnimationStep( const double currentProgress, const double /*prevProgress*/ )
{
FirstPersonAnimationData *ad = dynamic_cast< FirstPersonAnimationData* >( _animationData.get() );
assert( ad );
if (!ad) return;
// compute new rotation
_rotation.slerp( currentProgress, ad->_startRot, ad->_targetRot );