mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-12 19:31:46 +08:00
Fixed destructors of DiffViewCtrl and ObjectList after 8342b7f95bf52208f33fa4ed89da7a84e4260e9d and 0726b46da275642bb9f5ea3258be4550607bfe5b.
This commit is contained in:
parent
7bd8b3b892
commit
c2258dead7
@ -239,7 +239,8 @@ ObjectList::ObjectList(wxWindow* parent) :
|
|||||||
|
|
||||||
ObjectList::~ObjectList()
|
ObjectList::~ObjectList()
|
||||||
{
|
{
|
||||||
delete m_objects_model;
|
if (m_objects_model)
|
||||||
|
m_objects_model->DecRef();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectList::set_min_height()
|
void ObjectList::set_min_height()
|
||||||
|
@ -204,7 +204,12 @@ class DiffViewCtrl : public wxDataViewCtrl
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
DiffViewCtrl(wxWindow* parent, wxSize size);
|
DiffViewCtrl(wxWindow* parent, wxSize size);
|
||||||
~DiffViewCtrl() override { Clear(); delete model; }
|
~DiffViewCtrl() override {
|
||||||
|
if (model) {
|
||||||
|
Clear();
|
||||||
|
model->DecRef();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
DiffModel* model{ nullptr };
|
DiffModel* model{ nullptr };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user