diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 01288867a..dc4bb17e8 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -216,7 +216,11 @@ public: // load bitmap for logo BitmapCache bmp_cache; int logo_size = lround(width * 0.25); - wxBitmap logo_bmp = *bmp_cache.load_svg(wxGetApp().logo_name(), logo_size, logo_size); + wxBitmap* logo_bmp_ptr = bmp_cache.load_svg(wxGetApp().logo_name(), logo_size, logo_size); + if (logo_bmp_ptr == nullptr) + return; + + wxBitmap logo_bmp = *logo_bmp_ptr; wxCoord margin = int(m_scale * 20); diff --git a/src/slic3r/GUI/ImGuiWrapper.cpp b/src/slic3r/GUI/ImGuiWrapper.cpp index 73a4cc439..8e3d2ac5f 100644 --- a/src/slic3r/GUI/ImGuiWrapper.cpp +++ b/src/slic3r/GUI/ImGuiWrapper.cpp @@ -1684,6 +1684,10 @@ void ImGuiWrapper::init_font(bool compress) assert(rect->Width == icon_sz); assert(rect->Height == icon_sz); std::vector raw_data = load_svg(icon.second, icon_sz, icon_sz); + if (raw_data.empty()) { + rect_id++; + continue; + } const ImU32* pIn = (ImU32*)raw_data.data(); for (int y = 0; y < icon_sz; y++) { ImU32* pOut = (ImU32*)pixels + (rect->Y + y) * width + (rect->X); @@ -1720,6 +1724,10 @@ void ImGuiWrapper::init_font(bool compress) assert(rect->Width == icon_sz); assert(rect->Height == icon_sz); std::vector raw_data = load_svg(icon.second, icon_sz, icon_sz); + if (raw_data.empty()) { + rect_id++; + continue; + } const ImU32* pIn = (ImU32*)raw_data.data(); for (int y = 0; y < icon_sz; y++) { ImU32* pOut = (ImU32*)pixels + (rect->Y + y) * width + (rect->X);