]> git.mxchange.org Git - flightgear.git/blobdiff - src/Navaids/navdb.cxx
Fix crash starting at heliport.
[flightgear.git] / src / Navaids / navdb.cxx
index b94f1a3f8475f1d34fb0c109464544fcd5ecc6f5..9cc1654a974259e52e4c88d0b70cd73afd7303ff 100644 (file)
@@ -40,7 +40,7 @@
 #include "navlist.hxx"
 #include <Main/globals.hxx>
 #include <Navaids/markerbeacon.hxx>
-#include <Airports/simple.hxx>
+#include <Airports/airport.hxx>
 #include <Airports/runways.hxx>
 #include <Airports/xmlloader.hxx>
 #include <Main/fg_props.hxx>
@@ -164,7 +164,7 @@ static PositionedID readNavFromStream(std::istream& aStream,
       assert(runway);
       pos.setElevationFt(runway->geod().getElevationFt());
     }
-    
+
     return cache->insertNavaid(type, string(), name, pos, 0, 0, 0,
                                arp.first, arp.second);
   }
@@ -183,10 +183,14 @@ static PositionedID readNavFromStream(std::istream& aStream,
     if (arp.second) {
       runway = static_cast<FGRunway*>(cache->loadById(arp.second));
       assert(runway);
+#if 0
+      // code is disabled since it's causing some problems, see
+      // http://code.google.com/p/flightgear-bugs/issues/detail?id=926
       if (elev_ft < 0.01) {
         // snap to runway elevation
         pos.setElevationFt(runway->geod().getElevationFt());
       }
+#endif
     } // of found runway in the DB
   } // of type is runway-related