More defensive coding for wxDataViewCtrl selection access.
Fixes https://gitlab.com/kicad/code/kicad/issues/5747
This commit is contained in:
parent
4a0d469cec
commit
660cdcb056
|
@ -284,7 +284,7 @@ void DIALOG_DRC::OnDRCItemSelected( wxDataViewEvent& aEvent )
|
|||
{
|
||||
BOARD* board = m_brdEditor->GetBoard();
|
||||
RC_TREE_NODE* node = RC_TREE_MODEL::ToNode( aEvent.GetItem() );
|
||||
const KIID& itemID = RC_TREE_MODEL::ToUUID( aEvent.GetItem() );
|
||||
const KIID& itemID = node ? RC_TREE_MODEL::ToUUID( aEvent.GetItem() ) : niluuid;
|
||||
BOARD_ITEM* item = board->GetItem( itemID );
|
||||
|
||||
if( item )
|
||||
|
|
Loading…
Reference in New Issue