Update end item before moving on track/via change
The move even dereferences m_enditem for logging and perhaps other
actions. We need to ensure that the end item has not been invalidated
before taking this action
Fixes https://gitlab.com/kicad/code/kicad/issues/10732
(cherry picked from commit 901c330478
)
This commit is contained in:
parent
984eb0fb40
commit
4d6c2e4868
|
@ -2065,6 +2065,8 @@ int ROUTER_TOOL::onTrackViaSizeChanged( const TOOL_EVENT& aEvent )
|
|||
|
||||
// Changing the track width can affect the placement, so call the
|
||||
// move routine without changing the destination
|
||||
// Update end item first to avoid moving to an invalid/missing item
|
||||
updateEndItem( aEvent );
|
||||
m_router->Move( m_endSnapPoint, m_endItem );
|
||||
|
||||
UpdateMessagePanel();
|
||||
|
|
Loading…
Reference in New Issue