From f942e3e31fc8b308729cad442378e0ca7658efda Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 19 Jul 2017 13:00:48 +0200 Subject: [PATCH] Fixed a crash when items are unselected when dragging Fixes: lp:1702355 * https://bugs.launchpad.net/kicad/+bug/1702355 --- pcbnew/tools/edit_tool.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 673cba764e..0b0d467c80 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -481,7 +481,8 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent ) break; // exit the loop - we move exactly, so we have finished moving } - if( m_dragging ) + // TODO check if the following can be removed + if( m_dragging && !selection.Empty() ) { // Update dragging offset (distance between cursor and the first dragged item) m_offset = static_cast( selection.Front() )->GetPosition() - modPoint;