Eagle plugin: avoid hanging if an unexpected keyword is found.
Fixes: lp:1701672 https://bugs.launchpad.net/kicad/+bug/1701672
This commit is contained in:
parent
c311e63f0d
commit
1c5ace4b7a
|
@ -824,7 +824,12 @@ void EAGLE_PLUGIN::loadElements( wxXmlNode* aElements )
|
|||
while( element )
|
||||
{
|
||||
if( element->GetName() != "element" )
|
||||
{
|
||||
wxLogMessage( "expected: <element> read <%s>. Skip it", element->GetName() );
|
||||
// Get next item
|
||||
element = element->GetNext();
|
||||
continue;
|
||||
}
|
||||
|
||||
EELEMENT e( element );
|
||||
|
||||
|
@ -909,7 +914,11 @@ void EAGLE_PLUGIN::loadElements( wxXmlNode* aElements )
|
|||
while( attribute )
|
||||
{
|
||||
if( attribute->GetName() != "attribute" )
|
||||
{
|
||||
wxLogMessage( "expected: <attribute> read <%s>. Skip it", attribute->GetName() );
|
||||
attribute = attribute->GetNext();
|
||||
continue;
|
||||
}
|
||||
|
||||
EATTR a( attribute );
|
||||
|
||||
|
|
Loading…
Reference in New Issue