From a57ab6d12138701ca16c9db0d64f28a4a5094c05 Mon Sep 17 00:00:00 2001 From: Don BURNS Date: Sat, 13 Oct 2001 09:48:37 +0000 Subject: [PATCH] Added Mr. Osfields dynamic_cast<> and test for validity test. --- src/Demos/osgconv/orientationconverter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Demos/osgconv/orientationconverter.cpp b/src/Demos/osgconv/orientationconverter.cpp index 8293a007a..a59491435 100644 --- a/src/Demos/osgconv/orientationconverter.cpp +++ b/src/Demos/osgconv/orientationconverter.cpp @@ -34,6 +34,10 @@ void OrientationConverter::ConvertVisitor::apply( Geode &geode ) for( int i = 0; i < numdrawables; i++ ) { GeoSet *gset = dynamic_cast(geode.getDrawable(i)); + + if( gset == NULL ) + continue; + int numcoords = gset->getNumCoords(); Vec3 *vertex = gset->getCoords();