mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 18:35:57 +08:00
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:
parent
bcdc8829e4
commit
74799ade14
@ -77,7 +77,9 @@ static int extruders_count()
|
|||||||
|
|
||||||
static void take_snapshot(const wxString& snapshot_name)
|
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) :
|
ObjectList::ObjectList(wxWindow* parent) :
|
||||||
@ -3931,7 +3933,9 @@ void ObjectList::OnEditingDone(wxDataViewEvent &event)
|
|||||||
m_last_selected_column = -1;
|
m_last_selected_column = -1;
|
||||||
#endif //__WXMSW__
|
#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()
|
void ObjectList::show_multi_selection_menu()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user