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 = [&] () {
|
auto cleanup = [&] () {
|
||||||
preview.Clear();
|
preview.Clear();
|
||||||
delete aGraphic;
|
delete *aGraphic;
|
||||||
aGraphic = nullptr;
|
*aGraphic = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
if( evt->IsCancelInteractive() )
|
if( evt->IsCancelInteractive() )
|
||||||
|
|
Loading…
Reference in New Issue