]> git.mxchange.org Git - flightgear.git/blobdiff - src/Model/model_panel.cxx
Initial commit of the new sound system, expect more updates to follow
[flightgear.git] / src / Model / model_panel.cxx
index 4715ecf25cf1a2d20da6b028b5f81d6c820f3ce2..eef538cb0a41c7b809e7e3a2078afdf3066c3090 100644 (file)
@@ -14,9 +14,9 @@
 #include <simgear/props/props.hxx>
 #include <simgear/scene/model/modellib.hxx>
 #include <simgear/scene/util/SGNodeMasks.hxx>
+#include <simgear/math/SGMath.hxx>
 
 #include "panelnode.hxx"
-
 #include "model_panel.hxx"
 
 using std::vector;
@@ -40,7 +40,8 @@ osg::Node *
 fgLoad3DModelPanel(const string &path, SGPropertyNode *prop_root)
 {
     osg::Node* node = SGModelLib::loadModel(path, prop_root, load_panel);
-    node->setNodeMask(~SG_NODEMASK_TERRAIN_BIT);
+    if (node)
+        node->setNodeMask(~SG_NODEMASK_TERRAIN_BIT);
     return node;
 }