Delete the right object in arc cleanup
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4694
This commit is contained in:
parent
ad69e449fe
commit
a16c9df79c
|
@ -1265,8 +1265,8 @@ bool DRAWING_TOOL::drawArc( const std::string& aTool, DRAWSEGMENT** aGraphic, bo
|
|||
|
||||
auto cleanup = [&] () {
|
||||
preview.Clear();
|
||||
delete aGraphic;
|
||||
aGraphic = nullptr;
|
||||
delete *aGraphic;
|
||||
*aGraphic = nullptr;
|
||||
};
|
||||
|
||||
if( evt->IsCancelInteractive() )
|
||||
|
|
Loading…
Reference in New Issue