]> git.mxchange.org Git - flightgear.git/blobdiff - src/Model/panelnode.cxx
Fix an (unlikely) startup crash
[flightgear.git] / src / Model / panelnode.cxx
index 9de204fcd5ef26bf802d666533395c192f0b2e85..11b6125d692be9189d517fb339ff83b689c4f10a 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());