From d0926cce588e7b4212f6f936e7cfaf404de4a5dc Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Wed, 29 May 2019 20:51:22 -0400 Subject: [PATCH] PcbNew: prevent crash in point editor if selection gets invalidated --- pcbnew/tools/point_editor.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index fcf2012afb..20f60db4c9 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -317,6 +317,9 @@ int POINT_EDITOR::OnSelectionChange( const TOOL_EVENT& aEvent ) GRID_HELPER grid( editFrame ); BOARD_ITEM* item = static_cast( selection.Front() ); + if( !item ) + return 0; + m_editPoints = EDIT_POINTS_FACTORY::Make( item, getView()->GetGAL() ); if( !m_editPoints )