Added safety for POINT_EDITOR.

Fixes: lp:1786349
* https://bugs.launchpad.net/kicad/+bug/1786349
This commit is contained in:
Jeff Young 2018-09-17 12:31:57 +01:00
parent cd7ebaf9ee
commit 99cb1471c3
1 changed files with 4 additions and 1 deletions

View File

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