]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/groundcache.cxx
Developer-warnings
[flightgear.git] / src / FDM / groundcache.cxx
index fc4fdfacafac249b3494264b0ce85a78e290347e..0b341159aadd04bae91e51e22971dc989d2fd461 100644 (file)
@@ -382,10 +382,9 @@ FGGroundCache::prepare_ground_cache(double startSimTime, double endSimTime,
     if (!found_ground) {
         // Ok, still nothing here?? Last resort ...
         double alt = 0;
-        const SGMaterial* m = NULL;
+        _material = 0;
         found_ground = globals->get_scenery()->
-            get_elevation_m(SGGeod::fromGeodM(geodPt, 10000), alt, &m);
-        _material = m;
+            get_elevation_m(SGGeod::fromGeodM(geodPt, 10000), alt, &_material);
         if (found_ground)
             _altitude = alt;
     }
@@ -922,7 +921,7 @@ bool FGGroundCache::caught_wire(double t, const SGVec3d pt[4])
         _localBvhTree->accept(wireIntersector);
     
     _wire = wireIntersector.getWire();
-    return _wire;
+    return (_wire != NULL);
 }
 
 class FGGroundCache::WireFinder : public BVHVisitor {