From cdd1e3bf4cb7d79b597d58034e0837ae3837abca Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 24 Jun 2016 11:50:54 +0100 Subject: [PATCH] Added handling of 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 5e5baa4d8..5261b0a49 100644 --- a/src/osgGA/FirstPersonManipulator.cpp +++ b/src/osgGA/FirstPersonManipulator.cpp @@ -383,7 +383,7 @@ bool FirstPersonManipulator::startAnimationByMousePointerIntersection( return false; FirstPersonAnimationData *ad = dynamic_cast< FirstPersonAnimationData*>( _animationData.get() ); - assert( ad ); + if (!ad) return false; // setup animation data and restore original transformation ad->start( prevRot, _rotation, ea.getTime() );