diff --git a/src/osgPlugins/OpenFlight/expPrimaryRecords.cpp b/src/osgPlugins/OpenFlight/expPrimaryRecords.cpp index ec4f5c2e0..bcd4d3a19 100644 --- a/src/osgPlugins/OpenFlight/expPrimaryRecords.cpp +++ b/src/osgPlugins/OpenFlight/expPrimaryRecords.cpp @@ -420,7 +420,8 @@ FltExportVisitor::writeExternalReference( const osg::ProxyNode& proxy ) SHADER_PALETTE_OVERRIDE ; // Selectively turn off overrides for resources we don't need - const ParentPools* pp = static_cast(proxy.getUserData() ); + const ParentPools* pp = dynamic_cast(proxy.getUserData() ); + if (pp && pp->getColorPool() ) flags &= ~COLOR_PALETTE_OVERRIDE;