mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
Fix of [prusa3d/PrusaSlicer] Remove unnecessary null pointer checks (#5813)
Don't use if (ptr) delete ptr; call delete ptr; directly, it contains the test for null ptr.
This commit is contained in:
@@ -36,11 +36,8 @@ View3D::View3D(wxWindow* parent, Model* model, DynamicPrintConfig* config, Backg
|
||||
|
||||
View3D::~View3D()
|
||||
{
|
||||
if (m_canvas != nullptr)
|
||||
delete m_canvas;
|
||||
|
||||
if (m_canvas_widget != nullptr)
|
||||
delete m_canvas_widget;
|
||||
delete m_canvas;
|
||||
delete m_canvas_widget;
|
||||
}
|
||||
|
||||
bool View3D::init(wxWindow* parent, Model* model, DynamicPrintConfig* config, BackgroundSlicingProcess* process)
|
||||
|
||||
Reference in New Issue
Block a user