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:
parent
d06aa60691
commit
9a2310ae98
@ -49,7 +49,6 @@ BitmapTextRenderer::~BitmapTextRenderer()
|
||||
{
|
||||
#ifdef SUPPORTS_MARKUP
|
||||
#ifdef wxHAS_GENERIC_DATAVIEWCTRL
|
||||
if (m_markupText)
|
||||
delete m_markupText;
|
||||
#endif //wxHAS_GENERIC_DATAVIEWCTRL
|
||||
#endif // SUPPORTS_MARKUP
|
||||
|
@ -36,10 +36,7 @@ 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;
|
||||
}
|
||||
|
||||
|
@ -595,16 +595,9 @@ struct Sidebar::priv
|
||||
|
||||
Sidebar::priv::~priv()
|
||||
{
|
||||
if (object_manipulation != nullptr)
|
||||
delete object_manipulation;
|
||||
|
||||
if (object_settings != nullptr)
|
||||
delete object_settings;
|
||||
|
||||
if (frequently_changed_parameters != nullptr)
|
||||
delete frequently_changed_parameters;
|
||||
|
||||
if (object_layers != nullptr)
|
||||
delete object_layers;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user