diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index f1f05c9022..3a58214467 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -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() )