From 2a03296e5e29bbfb11ed75bf0add87fc5e5f7a97 Mon Sep 17 00:00:00 2001 From: timoore Date: Thu, 22 Nov 2007 23:46:39 +0000 Subject: [PATCH] initialize _material pointer in FGGroundCache _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 | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/FDM/groundcache.cxx b/src/FDM/groundcache.cxx index 035302dac..575cd8435 100644 --- a/src/FDM/groundcache.cxx +++ b/src/FDM/groundcache.cxx @@ -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()