Fix crash on startup if mixed filament has invalid component (#15432)

This commit is contained in:
yw4z
2026-09-06 00:17:42 +03:00
committed by GitHub
parent 6014f3fb43
commit 71e4e19191

View File

@@ -3988,16 +3988,16 @@ void Sidebar::update_mixed_filament_list()
p->m_panel_mixed_warning->Show(false);
// Show/dismiss 3D canvas notification for broken mixed filaments
if (has_mixed && !broken_set.empty()) {
auto* notify = wxGetApp().plater()->get_notification_manager();
if (notify)
auto* notify = plater->get_notification_manager();
GLCanvas3D* view3d_canvas = plater->get_view3D_canvas3D();
if(view3d_canvas && view3d_canvas->is_initialized() && notify){
if (has_mixed && !broken_set.empty()) {
notify->push_notification(NotificationType::BBLMixedFilamentBroken,
NotificationManager::NotificationLevel::ErrorNotificationLevel,
_u8L("Mixed filament has invalid or mismatched components. Please re-edit affected entries."));
} else {
auto* notify = wxGetApp().plater()->get_notification_manager();
if (notify)
} else {
notify->close_notification_of_type(NotificationType::BBLMixedFilamentBroken);
}
}
if (has_mixed) {