]> git.mxchange.org Git - flightgear.git/commitdiff
Emergency fix of a possible dereference dangling pointer path uncovered by Martin...
authordaveluff <daveluff>
Tue, 11 Mar 2003 17:15:23 +0000 (17:15 +0000)
committerdaveluff <daveluff>
Tue, 11 Mar 2003 17:15:23 +0000 (17:15 +0000)
src/ATC/tower.cxx

index ee78286149a18211a9094508f93fd6883f40705b..f5f26e34357d50e7c05e27dc08606ba4214dd77b 100644 (file)
@@ -24,6 +24,8 @@
 #include "ATCdisplay.hxx"
 #include "ATCmgr.hxx"
 
+SG_USING_STD(cout);
+
 // TowerPlaneRec
 
 TowerPlaneRec::TowerPlaneRec() :
@@ -123,7 +125,16 @@ void FGTower::Init() {
                        }
                }
        } else {
-               //cout << "Unable to find airport details in FGTower::Init()\n";
+               cout << "Unable to find airport details for " << ident << " in FGTower::Init()\n";
+               // Initialise ground anyway to avoid segfault later
+               ground = new FGGround(ident);
+               separateGround = false;
+               ground->Init();
+               if(display) {
+                       ground->SetDisplay();
+               } else {
+                       ground->SetNoDisplay();
+               }
        }
 }