From 5a3d53d9e4641c2927a24b98f9dd77a32c8ce41c 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 (cherry picked from commit 56d87a861328ad9ef64663c916b596d690c7e28c) --- 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 a4539aec13..f0195a7978 100644 --- a/eeschema/tools/ee_selection_tool.cpp +++ b/eeschema/tools/ee_selection_tool.cpp @@ -405,6 +405,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();