From f8dd3bc4c5aad5cdcad1236de2be3a30c60459bc Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 24 Jun 2016 11:50:07 +0100 Subject: [PATCH] Added handling null dynamic_cast --- src/osgGA/FirstPersonManipulator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgGA/FirstPersonManipulator.cpp b/src/osgGA/FirstPersonManipulator.cpp index 84d47c0d0..5e5baa4d8 100644 --- a/src/osgGA/FirstPersonManipulator.cpp +++ b/src/osgGA/FirstPersonManipulator.cpp @@ -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 );