PcbNew: prevent crash in point editor if selection gets invalidated
This commit is contained in:
parent
eb0fc7bae2
commit
d0926cce58
|
@ -317,6 +317,9 @@ int POINT_EDITOR::OnSelectionChange( const TOOL_EVENT& aEvent )
|
||||||
GRID_HELPER grid( editFrame );
|
GRID_HELPER grid( editFrame );
|
||||||
BOARD_ITEM* item = static_cast<BOARD_ITEM*>( selection.Front() );
|
BOARD_ITEM* item = static_cast<BOARD_ITEM*>( selection.Front() );
|
||||||
|
|
||||||
|
if( !item )
|
||||||
|
return 0;
|
||||||
|
|
||||||
m_editPoints = EDIT_POINTS_FACTORY::Make( item, getView()->GetGAL() );
|
m_editPoints = EDIT_POINTS_FACTORY::Make( item, getView()->GetGAL() );
|
||||||
|
|
||||||
if( !m_editPoints )
|
if( !m_editPoints )
|
||||||
|
|
Loading…
Reference in New Issue