]> git.mxchange.org Git - flightgear.git/blobdiff - src/Model/panelnode.cxx
Replace a program segmentation fault by an annoying message
[flightgear.git] / src / Model / panelnode.cxx
index 9de204fcd5ef26bf802d666533395c192f0b2e85..6399133f330e731e0285572442c276abd449bc5a 100644 (file)
@@ -65,7 +65,11 @@ public:
   virtual bool buttonPressed( int b,
                               const osgGA::GUIEventAdapter&,
                               const Info& info )
-  {    
+  {
+      if (!panel->getPanel()) {
+          return false;
+      }
+      
     button = b;
   // convert to panel coordinates
     osg::Matrixd m = osg::Matrixd::inverse(panel->transformMatrix());
@@ -311,7 +315,12 @@ FGPanelNode::drawImplementation(osg::State& state) const
 }
 
 osg::BoundingBox
-FGPanelNode::computeBound() const
+#if OSG_VERSION_LESS_THAN(3,3,2)
+FGPanelNode::computeBound()
+#else
+FGPanelNode::computeBoundingBox()
+#endif
+const
 {
 
   osg::Vec3 coords[3];