1
0
Fork 0

genapts: proper fix for LFPG segfault

This commit is contained in:
Christian Schmitt 2013-03-20 17:35:01 +01:00
parent 73f07b7506
commit 5132fa61d1

View file

@ -616,7 +616,7 @@ int Parser::ParseLine(char* line)
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 );
}
prev_node = NULL;
cur_node = NULL;
break;