PcbNew: prevent crash in point editor if selection gets invalidated

This commit is contained in:
Jon Evans 2019-05-29 20:51:22 -04:00
parent eb0fc7bae2
commit d0926cce58
1 changed files with 3 additions and 0 deletions

View File

@ -317,6 +317,9 @@ int POINT_EDITOR::OnSelectionChange( const TOOL_EVENT& aEvent )
GRID_HELPER grid( editFrame );
BOARD_ITEM* item = static_cast<BOARD_ITEM*>( selection.Front() );
if( !item )
return 0;
m_editPoints = EDIT_POINTS_FACTORY::Make( item, getView()->GetGAL() );
if( !m_editPoints )