]> git.mxchange.org Git - flightgear.git/blobdiff - src/Viewer/CameraGroup.cxx
Prepare and implement reinit methods for instruments
[flightgear.git] / src / Viewer / CameraGroup.cxx
index 4cabb31812e4bdda7988cfb17e0bfe800117ef94..3d84717e5b8316e85c737c33e30afe337c8c6b97 100644 (file)
@@ -1092,7 +1092,7 @@ void CameraGroup::setCameraCullMasks(Node::NodeMask nm)
             if (camera == 0) continue;
             osg::Switch* sw = camera->getChild(0)->asSwitch();
             for (unsigned int i = 0; i < sw->getNumChildren(); ++i) {
-                osg::Camera* lc = sw->getChild(i)->asCamera();
+                osg::Camera* lc = dynamic_cast<osg::Camera*>(sw->getChild(i));
                 if (lc == 0) continue;
                 string name = lc->getName();
                 if (name == "LightCamera") {