diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 41bb93340a..03be29686b 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -1006,6 +1006,8 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) m_frame->OnModify(); m_frame->SaveCopyInUndoList( zone, UR_NEW ); + + zone = NULL; } else delete zone;