Commit f472b6de authored by Wayne Stambaugh's avatar Wayne Stambaugh

Pcbnew: fix assertion when deleting BOARD_ITEM not linked to list. (fixes lp:1252696)

parent abfeab02
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment