From 0f3fecf0c6a17b2327054928d7ae660bb65a5e49 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sat, 22 Sep 2012 14:00:05 +0200 Subject: [PATCH] Fix NavDisplay segfault When "addSymbolInstance" returns NULL, we cannot update "ins->endPos". --- src/Instrumentation/NavDisplay.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Instrumentation/NavDisplay.cxx b/src/Instrumentation/NavDisplay.cxx index 862d00f26..ecf9bdfc5 100644 --- a/src/Instrumentation/NavDisplay.cxx +++ b/src/Instrumentation/NavDisplay.cxx @@ -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()); } -- 2.39.5