Browse Source

Don't presume a parent.

The m_parent field appears to only be set
if it *is* a footprint.
8.0
Jeff Young 8 months ago
parent
commit
340be56082
  1. 2
      pcbnew/board_commit.cpp

2
pcbnew/board_commit.cpp

@ -683,7 +683,7 @@ void BOARD_COMMIT::Revert()
BOARD_ITEM* parent = board->GetItem( ent.m_parent );
if( parent->Type() == PCB_FOOTPRINT_T )
if( parent && parent->Type() == PCB_FOOTPRINT_T )
{
static_cast<FOOTPRINT*>( parent )->Add( boardItem, ADD_MODE::INSERT );
}

Loading…
Cancel
Save