From 9e945e3408d3583ce8158204969b3443947d7101 Mon Sep 17 00:00:00 2001 From: jmt Date: Fri, 9 Jan 2009 13:15:03 +0000 Subject: [PATCH] Fix Torsten's crash. A completely cross-platform issue, no idea why it didn't show up in local testing. --- src/Navaids/positioned.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Navaids/positioned.cxx b/src/Navaids/positioned.cxx index 133dc7a41..d1e34373e 100644 --- a/src/Navaids/positioned.cxx +++ b/src/Navaids/positioned.cxx @@ -554,8 +554,14 @@ FGPositioned::findNextWithPartialId(FGPositionedRef aCur, const std::string& aId continue; } - if (aFilter && !aFilter->pass(candidate)) { - continue; + if (aFilter) { + if (aFilter->hasTypeRange() && !aFilter->passType(candidate->type())) { + continue; + } + + if(!aFilter->pass(candidate)) { + continue; + } } if (!aCur) {