Fixed destructors of DiffViewCtrl and ObjectList after 8342b7f95b
and 0726b46da2
.
This commit is contained in:
parent
7bd8b3b892
commit
c2258dead7
2 changed files with 8 additions and 2 deletions
src/slic3r/GUI
|
@ -239,7 +239,8 @@ ObjectList::ObjectList(wxWindow* parent) :
|
|||
|
||||
ObjectList::~ObjectList()
|
||||
{
|
||||
delete m_objects_model;
|
||||
if (m_objects_model)
|
||||
m_objects_model->DecRef();
|
||||
}
|
||||
|
||||
void ObjectList::set_min_height()
|
||||
|
|
|
@ -204,7 +204,12 @@ class DiffViewCtrl : public wxDataViewCtrl
|
|||
|
||||
public:
|
||||
DiffViewCtrl(wxWindow* parent, wxSize size);
|
||||
~DiffViewCtrl() override { Clear(); delete model; }
|
||||
~DiffViewCtrl() override {
|
||||
if (model) {
|
||||
Clear();
|
||||
model->DecRef();
|
||||
}
|
||||
}
|
||||
|
||||
DiffModel* model{ nullptr };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue