Don't try to post-process an empty clipboard paste.

Fixes: lp:1831364
* https://bugs.launchpad.net/kicad/+bug/1831364
This commit is contained in:
Jeff Young 2019-06-02 15:55:54 +01:00
parent 6ac273264d
commit dfc2fe3929
1 changed files with 3 additions and 0 deletions

View File

@ -607,6 +607,9 @@ int LIB_EDIT_TOOL::Paste( const TOOL_EVENT& aEvent )
return -1; return -1;
} }
if( !newPart )
return -1;
m_frame->SaveCopyInUndoList( part ); m_frame->SaveCopyInUndoList( part );
m_selectionTool->ClearSelection(); m_selectionTool->ClearSelection();