From 56d87a861328ad9ef64663c916b596d690c7e28c Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Wed, 12 Jan 2022 09:02:04 -0800 Subject: [PATCH] Catch default autowire case Since we are dereferencing the optional, we need to ensure it exists in all cases Fixes https://gitlab.com/kicad/code/kicad/issues/10394 --- eeschema/tools/ee_selection_tool.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eeschema/tools/ee_selection_tool.cpp b/eeschema/tools/ee_selection_tool.cpp index c74adac4e5..8c89779676 100644 --- a/eeschema/tools/ee_selection_tool.cpp +++ b/eeschema/tools/ee_selection_tool.cpp @@ -419,6 +419,10 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent ) { newEvt = EE_ACTIONS::drawLines.MakeEvent(); } + else + { + newEvt = EE_ACTIONS::drawLines.MakeEvent(); + } auto* params = newEvt->Parameter(); auto* newParams = new DRAW_SEGMENT_EVENT_PARAMS();