Delete the right object in arc cleanup

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4694
This commit is contained in:
Jon Evans 2020-06-21 13:03:14 -04:00
parent ad69e449fe
commit a16c9df79c
1 changed files with 2 additions and 2 deletions

View File

@ -1265,8 +1265,8 @@ bool DRAWING_TOOL::drawArc( const std::string& aTool, DRAWSEGMENT** aGraphic, bo
auto cleanup = [&] () { auto cleanup = [&] () {
preview.Clear(); preview.Clear();
delete aGraphic; delete *aGraphic;
aGraphic = nullptr; *aGraphic = nullptr;
}; };
if( evt->IsCancelInteractive() ) if( evt->IsCancelInteractive() )