From bd0b5085dbbf0cf17c75de28f6f02079ab3ae87b Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 12 Jun 2001 18:45:23 +0000 Subject: [PATCH] Fixed an data initialization problem that was causing MSVC grief. --- src/Main/viewer.cxx | 1 + src/Objects/matlib.cxx | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/Main/viewer.cxx b/src/Main/viewer.cxx index 85204ad5d..8c75ed848 100644 --- a/src/Main/viewer.cxx +++ b/src/Main/viewer.cxx @@ -39,6 +39,7 @@ FGViewer::FGViewer( void ): view_offset(0.0), goal_view_offset(0.0) { + sgSetVec3( pilot_offset, 0.0, 0.0, 0.0 ); } diff --git a/src/Objects/matlib.cxx b/src/Objects/matlib.cxx index 6bac2370b..55a6b25db 100644 --- a/src/Objects/matlib.cxx +++ b/src/Objects/matlib.cxx @@ -267,6 +267,13 @@ FGNewMat *FGMaterialLib::find( const string& material ) { // Destructor FGMaterialLib::~FGMaterialLib ( void ) { + // Free up all the material entries first + for ( material_map_iterator it = begin(); it != end(); it++ ) { + FGNewMat *slot = it->second; + if ( slot != NULL ) { + delete slot; + } + } } -- 2.39.5