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 56d87a8613
)
This commit is contained in:
parent
cf11abda3d
commit
5a3d53d9e4
|
@ -405,6 +405,10 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
newEvt = EE_ACTIONS::drawLines.MakeEvent();
|
newEvt = EE_ACTIONS::drawLines.MakeEvent();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newEvt = EE_ACTIONS::drawLines.MakeEvent();
|
||||||
|
}
|
||||||
|
|
||||||
auto* params = newEvt->Parameter<DRAW_SEGMENT_EVENT_PARAMS*>();
|
auto* params = newEvt->Parameter<DRAW_SEGMENT_EVENT_PARAMS*>();
|
||||||
auto* newParams = new DRAW_SEGMENT_EVENT_PARAMS();
|
auto* newParams = new DRAW_SEGMENT_EVENT_PARAMS();
|
||||||
|
|
Loading…
Reference in New Issue