From 5132fa61d17b9dccb8b58ccb933b9e392b58bc3e Mon Sep 17 00:00:00 2001 From: Christian Schmitt Date: Wed, 20 Mar 2013 17:35:01 +0100 Subject: [PATCH] genapts: proper fix for LFPG segfault --- src/Airports/GenAirports850/parser.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Airports/GenAirports850/parser.cxx b/src/Airports/GenAirports850/parser.cxx index ef12669e..0b9d35ae 100644 --- a/src/Airports/GenAirports850/parser.cxx +++ b/src/Airports/GenAirports850/parser.cxx @@ -615,8 +615,8 @@ int Parser::ParseLine(char* line) case CLOSE_BEZIER_NODE_CODE: TG_LOG(SG_GENERAL, SG_DEBUG, "Parsing close loop node: " << line); cur_node = ParseNode( code, line, prev_node ); - - if ( cur_state == STATE_PARSE_PAVEMENT ) + + if ( cur_state == STATE_PARSE_PAVEMENT && prev_node ) { if (cur_node != prev_node) { @@ -659,8 +659,8 @@ int Parser::ParseLine(char* line) cur_airport->AddFeature( cur_feat ); } cur_feat = NULL; + SetState( STATE_PARSE_SIMPLE ); } - SetState( STATE_PARSE_SIMPLE ); prev_node = NULL; cur_node = NULL; break;