Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Matena <lukasmatena@seznam.cz>2020-02-21 12:02:41 +0300
committerLukas Matena <lukasmatena@seznam.cz>2020-02-21 12:02:41 +0300
commit74799ade143e2f85e4a306ce6303e6e47fe5707a (patch)
tree1326f21e8550c8d6b7337dda515db1fc6683c01d /src/slic3r/GUI/GUI_ObjectList.cpp
parentbcdc8829e4439dbc7f18c7a3f4559c4ea6d9fbd1 (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.cpp8
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()