Fixed two cases of crashes on application close

Both related to ObjectList - it was attempting to call plater after it was destroyed
Approved by @YuSanka
This commit is contained in:
Lukas Matena 2020-02-21 10:02:41 +01:00
parent bcdc8829e4
commit 74799ade14

View file

@ -77,7 +77,9 @@ static int extruders_count()
static void take_snapshot(const wxString& snapshot_name)
{
wxGetApp().plater()->take_snapshot(snapshot_name);
Plater* plater = wxGetApp().plater();
if (plater)
plater->take_snapshot(snapshot_name);
}
ObjectList::ObjectList(wxWindow* parent) :
@ -3931,7 +3933,9 @@ void ObjectList::OnEditingDone(wxDataViewEvent &event)
m_last_selected_column = -1;
#endif //__WXMSW__
wxGetApp().plater()->set_current_canvas_as_dirty();
Plater* plater = wxGetApp().plater();
if (plater)
plater->set_current_canvas_as_dirty();
}
void ObjectList::show_multi_selection_menu()