Pcbnew: fix assertion when deleting BOARD_ITEM not linked to list. (fixes lp:1252696)
This commit is contained in:
parent
abfeab02d7
commit
f472b6deb1
|
@ -172,11 +172,13 @@ public:
|
|||
|
||||
/**
|
||||
* Function DeleteStructure
|
||||
* deletes this object after UnLink()ing it from its owner.
|
||||
* deletes this object after UnLink()ing it from its owner if it has one.
|
||||
*/
|
||||
void DeleteStructure()
|
||||
{
|
||||
UnLink();
|
||||
if( GetList() != NULL )
|
||||
UnLink();
|
||||
|
||||
delete this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue