diff --git a/src/slic3r/GUI/Field.cpp b/src/slic3r/GUI/Field.cpp index 561649595..2de72c195 100644 --- a/src/slic3r/GUI/Field.cpp +++ b/src/slic3r/GUI/Field.cpp @@ -581,6 +581,7 @@ static void unbind_events(wxEvtHandler *h) void free_window(wxWindow *win) { +#if !defined(__WXGTK__) unbind_events(win); for (auto c : win->GetChildren()) if (dynamic_cast(c)) @@ -591,6 +592,9 @@ void free_window(wxWindow *win) win->Reparent(wxGetApp().mainframe); if (win->GetClientData()) reinterpret_cast*>(win->GetClientData())->push_back(win); +#else + delete win; +#endif } template