From 62d1e7ac644a17e38cbd2e116f0fad63a7673da3 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 27 Jun 2016 11:33:55 +0100 Subject: [PATCH] Restructed the cast --- src/osgPlugins/ac/ac3d.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/osgPlugins/ac/ac3d.cpp b/src/osgPlugins/ac/ac3d.cpp index acca77b46..bea9384a9 100644 --- a/src/osgPlugins/ac/ac3d.cpp +++ b/src/osgPlugins/ac/ac3d.cpp @@ -167,9 +167,10 @@ class ReaderWriterAC : public osgDB::ReaderWriter virtual WriteResult writeNode(const osg::Node& node,std::ostream& fout, const Options* opts) const { // write ac file. - if(dynamic_cast(&node)) + + const osg::Group *gp=node.asGroup(); + if(gp) { - const osg::Group *gp=dynamic_cast(&node); const unsigned int nch=gp->getNumChildren(); for (unsigned int i=0; i