1
0
Fork 0

Emergency fix of a possible dereference dangling pointer path uncovered by Martin Spott

This commit is contained in:
daveluff 2003-03-11 17:15:23 +00:00
parent 46261bb51b
commit ac731cdd36

View file

@ -24,6 +24,8 @@
#include "ATCdisplay.hxx" #include "ATCdisplay.hxx"
#include "ATCmgr.hxx" #include "ATCmgr.hxx"
SG_USING_STD(cout);
// TowerPlaneRec // TowerPlaneRec
TowerPlaneRec::TowerPlaneRec() : TowerPlaneRec::TowerPlaneRec() :
@ -123,7 +125,16 @@ void FGTower::Init() {
} }
} }
} else { } 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();
}
} }
} }