More defensive coding for wxDataViewCtrl selection access.

Fixes https://gitlab.com/kicad/code/kicad/issues/5747
This commit is contained in:
Jeff Young 2020-09-23 20:31:16 +01:00
parent 4a0d469cec
commit 660cdcb056
1 changed files with 1 additions and 1 deletions

View File

@ -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 )