SPE-1629 - Fixed crash at startup when any of the svg files used as icon into imgui dialog is renamed/removed.

This commit is contained in:
enricoturri1966 2023-04-03 10:48:59 +02:00
parent f9c784dd41
commit 81cebe5be3

View file

@ -1700,6 +1700,10 @@ void ImGuiWrapper::init_font(bool compress)
assert(rect->Width == icon_sz);
assert(rect->Height == icon_sz);
std::vector<unsigned char> 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);