Fix crash when importing Eagle board file with no "classes" element.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15754
This commit is contained in:
parent
2a04e6ac63
commit
0e4fe545a4
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||
* Copyright (C) 2012-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2012-2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -2531,6 +2531,10 @@ void PCB_IO_EAGLE::deleteTemplates()
|
|||
|
||||
void PCB_IO_EAGLE::loadClasses( wxXmlNode* aClasses )
|
||||
{
|
||||
// Eagle board DTD defines the "classes" element as 0 or 1.
|
||||
if( !aClasses )
|
||||
return;
|
||||
|
||||
BOARD_DESIGN_SETTINGS& bds = m_board->GetDesignSettings();
|
||||
|
||||
m_xpath->push( "classes.class", "number" );
|
||||
|
@ -2595,6 +2599,10 @@ void PCB_IO_EAGLE::loadClasses( wxXmlNode* aClasses )
|
|||
|
||||
void PCB_IO_EAGLE::loadSignals( wxXmlNode* aSignals )
|
||||
{
|
||||
// Eagle board DTD defines the "signals" element as 0 or 1.
|
||||
if( !aSignals )
|
||||
return;
|
||||
|
||||
ZONES zones; // per net
|
||||
int netCode = 1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue