Fix crash when start print from sdcard

This commit is contained in:
Noisyfox
2025-05-05 17:17:03 +08:00
parent 7c60219ab1
commit b9729f872a

View File

@@ -7813,7 +7813,7 @@ wxString Plater::priv::get_export_gcode_filename(const wxString& extension, bool
}
} else {
if (only_filename) {
if(m_project_name == _L("Untitled"))
if(!model.objects.empty() && m_project_name == _L("Untitled"))
return wxString(fs::path(model.objects.front()->name).replace_extension().c_str()) + from_u8(plate_index_str) + extension;
if (export_all)