Pcbnew: fix segfault when importing netlist with no footprint assignments.
Fixes lp:1647803 https://bugs.launchpad.net/kicad/+bug/1647803
This commit is contained in:
parent
3d89fb640a
commit
5476e97bfa
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2016 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
|
||||
|
@ -224,13 +224,7 @@ public:
|
|||
* Function DeleteStructure
|
||||
* deletes this object after UnLink()ing it from its owner if it has one.
|
||||
*/
|
||||
void DeleteStructure()
|
||||
{
|
||||
if( GetList() != NULL )
|
||||
UnLink();
|
||||
|
||||
delete this;
|
||||
}
|
||||
void DeleteStructure();
|
||||
|
||||
/**
|
||||
* Function ShowShape
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
|
||||
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2016 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
|
||||
|
@ -247,3 +247,14 @@ int BOARD_ITEM::getNextNumberInSequence( const std::set<int>& aSeq, bool aFillSe
|
|||
|
||||
return candidate;
|
||||
}
|
||||
|
||||
|
||||
void BOARD_ITEM::DeleteStructure()
|
||||
{
|
||||
auto brd = GetBoard();
|
||||
|
||||
if( brd )
|
||||
brd->Remove( this );
|
||||
|
||||
delete this;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue