]> git.mxchange.org Git - flightgear.git/commitdiff
initialize _material pointer in FGGroundCache
authortimoore <timoore>
Thu, 22 Nov 2007 23:46:39 +0000 (23:46 +0000)
committertimoore <timoore>
Thu, 22 Nov 2007 23:46:39 +0000 (23:46 +0000)
_material was uninitialized. This was causing a segfault with
as-yet-to-be-checked-in paging code; I don't know if it ever resulted
in a segfault with the old tile loader, but it certainly could have.

src/FDM/groundcache.cxx

index 035302dacb04c38c693053be75afc7df502c327e..575cd8435343e113d3a58fdc8cd733ede906c982 100644 (file)
@@ -436,14 +436,15 @@ public:
   FGGroundCache::GroundProperty mGroundProperty;
 };
 
-FGGroundCache::FGGroundCache()
+FGGroundCache::FGGroundCache() :
+  ground_radius(0.0),
+  cache_ref_time(0.0),
+  wire_id(0),
+  reference_wgs84_point(SGVec3d(0, 0, 0)),
+  reference_vehicle_radius(0.0),
+  found_ground(false),
+  _material(0)
 {
-  ground_radius = 0.0;
-  cache_ref_time = 0.0;
-  wire_id = 0;
-  reference_wgs84_point = SGVec3d(0, 0, 0);
-  reference_vehicle_radius = 0.0;
-  found_ground = false;
 }
 
 FGGroundCache::~FGGroundCache()