Fix NavDisplay segfault
When "addSymbolInstance" returns NULL, we cannot update "ins->endPos".
This commit is contained in:
parent
acb7fb8e95
commit
0f3fecf0c6
1 changed files with 1 additions and 1 deletions
|
@ -1172,7 +1172,7 @@ void NavDisplay::foundPositionedItem(FGPositioned* pos)
|
||||||
|
|
||||||
BOOST_FOREACH(SymbolRule* r, rules) {
|
BOOST_FOREACH(SymbolRule* r, rules) {
|
||||||
SymbolInstance* ins = addSymbolInstance(projected, heading, r->getDefinition(), vars);
|
SymbolInstance* ins = addSymbolInstance(projected, heading, r->getDefinition(), vars);
|
||||||
if (pos->type() == FGPositioned::RUNWAY) {
|
if ((ins)&&(pos->type() == FGPositioned::RUNWAY)) {
|
||||||
FGRunway* rwy = (FGRunway*) pos;
|
FGRunway* rwy = (FGRunway*) pos;
|
||||||
ins->endPos = projectGeod(rwy->end());
|
ins->endPos = projectGeod(rwy->end());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue