From f42f6e4fb9f8952ac5b77748357613ecea1761f5 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 24 Jun 2016 11:49:14 +0100 Subject: [PATCH] Added handling or null dynamic_cast --- src/osgGA/OrbitManipulator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgGA/OrbitManipulator.cpp b/src/osgGA/OrbitManipulator.cpp index bd886372a..4c72d20e2 100644 --- a/src/osgGA/OrbitManipulator.cpp +++ b/src/osgGA/OrbitManipulator.cpp @@ -356,7 +356,7 @@ bool OrbitManipulator::startAnimationByMousePointerIntersection( return false; OrbitAnimationData *ad = dynamic_cast< OrbitAnimationData*>( _animationData.get() ); - assert( ad ); + if (!ad) return false; // setup animation data and restore original transformation ad->start( osg::Vec3d(_center) - prevCenter, ea.getTime() );