From 45618327cf72a10d6657e955ef1e3d101405ec36 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 30 Oct 2020 13:57:59 +0000 Subject: [PATCH] Fix crash bug closing schematic with sheet selected. --- eeschema/tools/ee_selection_tool.cpp | 3 +++ pcbnew/tools/selection_tool.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/eeschema/tools/ee_selection_tool.cpp b/eeschema/tools/ee_selection_tool.cpp index c944dcbfbf..f93b6d8fc5 100644 --- a/eeschema/tools/ee_selection_tool.cpp +++ b/eeschema/tools/ee_selection_tool.cpp @@ -576,6 +576,9 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent ) } } + // Shutting down; clear the selection + m_selection.Clear(); + return 0; } diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 8e4fce343e..4c2bc75645 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -358,6 +358,9 @@ int SELECTION_TOOL::Main( const TOOL_EVENT& aEvent ) } } + // Shutting down; clear the selection + m_selection.Clear(); + return 0; }