Added safety for POINT_EDITOR.
Fixes: lp:1786349 * https://bugs.launchpad.net/kicad/+bug/1786349
This commit is contained in:
parent
cd7ebaf9ee
commit
99cb1471c3
|
@ -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…
Reference in New Issue