mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
Fixed exception when closing Slic3r
This commit is contained in:
@@ -2426,10 +2426,13 @@ void Tab::OnTreeSelChange(wxTreeEvent& event)
|
|||||||
wxWindowUpdateLocker noUpdates(this);
|
wxWindowUpdateLocker noUpdates(this);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (m_pages.empty())
|
||||||
|
return;
|
||||||
|
|
||||||
Page* page = nullptr;
|
Page* page = nullptr;
|
||||||
const auto sel_item = m_treectrl->GetSelection();
|
const auto sel_item = m_treectrl->GetSelection();
|
||||||
const auto selection = sel_item ? m_treectrl->GetItemText(sel_item) : "";
|
const auto selection = sel_item ? m_treectrl->GetItemText(sel_item) : "";
|
||||||
for (auto p : m_pages)
|
for (auto p : m_pages)
|
||||||
if (p->title() == selection)
|
if (p->title() == selection)
|
||||||
{
|
{
|
||||||
page = p.get();
|
page = p.get();
|
||||||
|
|||||||
Reference in New Issue
Block a user