]> git.mxchange.org Git - flightgear.git/commitdiff
Fix an (unlikely) startup crash
authorJames Turner <zakalawe@mac.com>
Sat, 15 Feb 2014 18:48:25 +0000 (18:48 +0000)
committerJames Turner <zakalawe@mac.com>
Mon, 24 Feb 2014 11:41:04 +0000 (11:41 +0000)
Encountered this by accidentally clicking during startup

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());