1
0
Fork 0

Fix NavDisplay segfault

When "addSymbolInstance" returns NULL, we cannot update "ins->endPos".
This commit is contained in:
ThorstenB 2012-09-22 14:00:05 +02:00
parent acb7fb8e95
commit 0f3fecf0c6

View file

@ -1172,7 +1172,7 @@ void NavDisplay::foundPositionedItem(FGPositioned* pos)
BOOST_FOREACH(SymbolRule* r, rules) {
SymbolInstance* ins = addSymbolInstance(projected, heading, r->getDefinition(), vars);
if (pos->type() == FGPositioned::RUNWAY) {
if ((ins)&&(pos->type() == FGPositioned::RUNWAY)) {
FGRunway* rwy = (FGRunway*) pos;
ins->endPos = projectGeod(rwy->end());
}