Browse Source

Added safety for POINT_EDITOR.

Fixes: lp:1786349
* https://bugs.launchpad.net/kicad/+bug/1786349
pull/13/head
Jeff Young 7 years ago
parent
commit
99cb1471c3
  1. 5
      pcbnew/tools/point_editor.cpp

5
pcbnew/tools/point_editor.cpp

@ -293,6 +293,9 @@ void POINT_EDITOR::updateEditedPoint( const TOOL_EVENT& aEvent )
int POINT_EDITOR::OnSelectionChange( const TOOL_EVENT& aEvent )
{
if( !m_selectionTool )
return 0;
const SELECTION& selection = m_selectionTool->GetSelection();
if( selection.Size() != 1 )
@ -1075,7 +1078,7 @@ int POINT_EDITOR::addCorner( const TOOL_EVENT& aEvent )
int POINT_EDITOR::removeCorner( const TOOL_EVENT& aEvent )
{
if( !m_editedPoint )
if( !m_editPoints || !m_editedPoint )
return 0;
EDA_ITEM* item = m_editPoints->GetParent();

Loading…
Cancel
Save