diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 5b8943d998..55e266ca78 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -10289,6 +10289,9 @@ void GLCanvas3D::_set_warning_notification_if_needed(EWarning warning) void GLCanvas3D::_set_warning_notification(EWarning warning, bool state) { + // Skip on shutdown: Plater's pImpl is already freed, so get_notification_manager() would use-after-free. + if (wxGetApp().is_closing()) + return; using NotificationLevel = NotificationManager::NotificationLevel; enum ErrorType{ PLATER_WARNING, diff --git a/src/slic3r/GUI/Selection.cpp b/src/slic3r/GUI/Selection.cpp index b2caaed55d..5d6a545873 100644 --- a/src/slic3r/GUI/Selection.cpp +++ b/src/slic3r/GUI/Selection.cpp @@ -760,6 +760,9 @@ void Selection::clear() #endif // #et_FIXME fake KillFocus from sidebar + // Skip on shutdown: Plater's pImpl is already freed, so plater()->canvas3D() would use-after-free. + if (wxGetApp().is_closing()) + return; wxGetApp().plater()->canvas3D()->handle_sidebar_focus_event("", false); }