From: curt Date: Tue, 12 Jun 2001 18:45:23 +0000 (+0000) Subject: Fixed an data initialization problem that was causing MSVC grief. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bd0b5085dbbf0cf17c75de28f6f02079ab3ae87b;p=flightgear.git Fixed an data initialization problem that was causing MSVC grief. --- 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; + } + } }