diff options
author | Lukas Matena <lukasmatena@seznam.cz> | 2020-02-21 12:02:41 +0300 |
---|---|---|
committer | Lukas Matena <lukasmatena@seznam.cz> | 2020-02-21 12:02:41 +0300 |
commit | 74799ade143e2f85e4a306ce6303e6e47fe5707a (patch) | |
tree | 1326f21e8550c8d6b7337dda515db1fc6683c01d /src/slic3r/GUI/GUI_ObjectList.cpp | |
parent | bcdc8829e4439dbc7f18c7a3f4559c4ea6d9fbd1 (diff) |
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
Diffstat (limited to 'src/slic3r/GUI/GUI_ObjectList.cpp')
-rw-r--r-- | src/slic3r/GUI/GUI_ObjectList.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index a5566de29..f5f554830 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -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() |