]> git.mxchange.org Git - flightgear.git/commitdiff
Fixed an data initialization problem that was causing MSVC grief.
authorcurt <curt>
Tue, 12 Jun 2001 18:45:23 +0000 (18:45 +0000)
committercurt <curt>
Tue, 12 Jun 2001 18:45:23 +0000 (18:45 +0000)
src/Main/viewer.cxx
src/Objects/matlib.cxx

index 85204ad5d23904e1788c254a0333f3573d0088b1..8c75ed84851e445a50fc80d8c7067c5bf608566a 100644 (file)
@@ -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 );
 }
 
 
index 6bac2370b0da27da6ffef3bfe741b313ed7ee940..55a6b25dbeb597d00208f3a87b22429402e7748e 100644 (file)
@@ -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;
+        }
+    }
 }