From 940aef77afa88fe360baf5204dd0b688dd573409 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Sun, 31 Mar 2019 16:06:50 -0700 Subject: [PATCH] pcbnew: Update points before refresh When removing a point from the polygon, the vertex is removed before it is tested for validity. If it fails validation, the edit is reverted and the point count doesn't change, so the view update only modifies the existing points. But the revert may also have changed the shared pointer to the point array, invalidating the view's copy. Fixes: lp:1821909 * https://bugs.launchpad.net/kicad/+bug/1821909 --- pcbnew/tools/point_editor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 9411cf1dd2..d50dd095aa 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -1165,6 +1165,7 @@ int POINT_EDITOR::removeCorner( const TOOL_EVENT& aEvent ) } setEditedPoint( nullptr ); + updatePoints(); if( valid ) commit.Push( _( "Remove a zone/polygon corner" ) );