Fixed a crash caused by double-free on application close event (Linux)
This commit is contained in:
parent
61d59a7a2e
commit
ddcb2b1c23
3 changed files with 8 additions and 26 deletions
src/slic3r/GUI
|
@ -95,14 +95,10 @@ wxFrame(NULL, wxID_ANY, SLIC3R_BUILD, wxDefaultPosition, wxDefaultSize, wxDEFAUL
|
|||
_3DScene::remove_all_canvases();
|
||||
// Slic3r::GUI::deregister_on_request_update_callback();
|
||||
|
||||
// destroy and set to null tabs and a platter
|
||||
// set to null tabs and a platter
|
||||
// to avoid any manipulations with them from App->wxEVT_IDLE after of the mainframe closing
|
||||
wxGetApp().clear_tabs_list();
|
||||
if (wxGetApp().plater_) {
|
||||
// before creating a new plater let's delete old one
|
||||
wxGetApp().plater_->Destroy();
|
||||
wxGetApp().plater_ = nullptr;
|
||||
}
|
||||
wxGetApp().tabs_list.clear();
|
||||
wxGetApp().plater_ = nullptr;
|
||||
|
||||
// propagate event
|
||||
event.Skip();
|
||||
|
@ -113,6 +109,7 @@ wxFrame(NULL, wxID_ANY, SLIC3R_BUILD, wxDefaultPosition, wxDefaultSize, wxDEFAUL
|
|||
update_ui_from_settings(); // FIXME (?)
|
||||
}
|
||||
|
||||
|
||||
void MainFrame::init_tabpanel()
|
||||
{
|
||||
m_tabpanel = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_TOP | wxTAB_TRAVERSAL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue