From 5502fafafbbb89184a105577ecaae1a022d438c2 Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Thu, 20 Mar 2025 22:35:29 -0500 Subject: [PATCH] CAM: Add missing destructor Coverity issue 513026 --- src/Mod/CAM/PathSimulator/AppGL/DlgCAMSimulator.cpp | 5 +++++ src/Mod/CAM/PathSimulator/AppGL/DlgCAMSimulator.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Mod/CAM/PathSimulator/AppGL/DlgCAMSimulator.cpp b/src/Mod/CAM/PathSimulator/AppGL/DlgCAMSimulator.cpp index 0ffa463d67..59806559c6 100644 --- a/src/Mod/CAM/PathSimulator/AppGL/DlgCAMSimulator.cpp +++ b/src/Mod/CAM/PathSimulator/AppGL/DlgCAMSimulator.cpp @@ -46,6 +46,11 @@ DlgCAMSimulator::DlgCAMSimulator(QWindow* parent) mMillSimulator = new MillSimulation(); } +DlgCAMSimulator::~DlgCAMSimulator() +{ + delete mMillSimulator; +} + void DlgCAMSimulator::render(QPainter* painter) { Q_UNUSED(painter); diff --git a/src/Mod/CAM/PathSimulator/AppGL/DlgCAMSimulator.h b/src/Mod/CAM/PathSimulator/AppGL/DlgCAMSimulator.h index b962424971..ddd8ed981e 100644 --- a/src/Mod/CAM/PathSimulator/AppGL/DlgCAMSimulator.h +++ b/src/Mod/CAM/PathSimulator/AppGL/DlgCAMSimulator.h @@ -62,7 +62,7 @@ class DlgCAMSimulator: public QWindow, public QOpenGLExtraFunctions Q_OBJECT public: explicit DlgCAMSimulator(QWindow* parent = nullptr); - ~DlgCAMSimulator() override = default; + ~DlgCAMSimulator() override; virtual void render(QPainter* painter); virtual void render();