]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/panel.cxx
- delete bindings in the *destructor* (must have been an editing accident)
[flightgear.git] / src / Cockpit / panel.cxx
index 09194ef12de8cc31178e675b7a994227a78dd98b..cc0785c9347d72f8944922b8a6832d296bf01026 100644 (file)
@@ -29,7 +29,9 @@
 #include <stdio.h>     // sprintf
 #include <string.h>
 
-#include <GL/glu.h>
+#include <simgear/compiler.h>
+
+#include SG_GLU_H
 
 #include <plib/ssg.h>
 #include <plib/fnt.h>
@@ -596,14 +598,14 @@ FGPanelAction::FGPanelAction (int button, int x, int y, int w, int h,
                               bool repeatable)
     : _button(button), _x(x), _y(y), _w(w), _h(h), _repeatable(repeatable)
 {
-  for (unsigned int i = 0; i < 2; i++) {
-      for (unsigned int j = 0; j < _bindings[i].size(); j++)
-          delete _bindings[i][j];
-  }
 }
 
 FGPanelAction::~FGPanelAction ()
 {
+  for (unsigned int i = 0; i < 2; i++) {
+      for (unsigned int j = 0; j < _bindings[i].size(); j++)
+          delete _bindings[i][j];
+  }
 }
 
 void