FIX: crash when load printer_file thumbnail failed
Change-Id: I3ea988cb95e6721f21e0b1ff6c70dc3dbf8d9f7e Jira: STUDIO-8052
This commit is contained in:
parent
f095e2bcb4
commit
e3c534cd64
|
@ -65,10 +65,14 @@ PrinterFileSystem::PrinterFileSystem()
|
|||
: BambuLib(StaticBambuLib::get(this))
|
||||
{
|
||||
if (!default_thumbnail.IsOk()) {
|
||||
default_thumbnail = *Slic3r::GUI::BitmapCache().load_svg("printer_file", 0, 0);
|
||||
Slic3r::GUI::BitmapCache c;
|
||||
auto thumbnail = c.load_svg("printer_file", 0, 0);
|
||||
if (thumbnail && thumbnail->IsOk()) {
|
||||
default_thumbnail = *thumbnail;
|
||||
#ifdef __APPLE__
|
||||
default_thumbnail = wxBitmap(default_thumbnail.ConvertToImage(), -1, 1);
|
||||
default_thumbnail = wxBitmap(default_thumbnail.ConvertToImage(), -1, 1);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
m_session.owner = this;
|
||||
#ifdef PRINTER_FILE_SYSTEM_TEST
|
||||
|
|
Loading…
Reference in New Issue