mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-08 19:29:01 +08:00
FIX: load 3mf crash when studio has no base filament
Jira: none Change-Id: I4387f425f60e6a53a53cf68addb1ab2d6f8f8901 Signed-off-by: maosheng.wei <maosheng.wei@bambulab.com>
This commit is contained in:
parent
de44625f1d
commit
7ad3547969
@ -13255,13 +13255,13 @@ void Plater::post_process_string_object_exception(StringObjectException &err)
|
||||
filament_name = filament_it->alias;
|
||||
} else {
|
||||
auto preset = preset_bundle->filaments.get_preset_base(*filament_it);
|
||||
if (!preset->alias.empty()) {
|
||||
if (preset && !preset->alias.empty()) {
|
||||
filament_name = preset->alias;
|
||||
} else {
|
||||
char target = '@';
|
||||
size_t pos = preset->name.find(target);
|
||||
size_t pos = filament_name.find(target);
|
||||
if (pos != std::string::npos) {
|
||||
filament_name = preset->name.substr(0, pos - 1);
|
||||
filament_name = filament_name.substr(0, pos - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user