1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-09-24 03:28:33 +02:00

Added assert to catch font data loading failure in a location that's easier to understand

This commit is contained in:
omar 2014-11-14 11:22:35 +09:00
parent 9b5493d1d9
commit 9c707b6d8f

View File

@ -1333,6 +1333,7 @@ void ImGui::NewFrame()
g.IO.Font = (ImBitmapFont*)ImGui::MemAlloc(sizeof(ImBitmapFont));
new(g.IO.Font) ImBitmapFont();
g.IO.Font->LoadFromMemory(fnt_data, fnt_size);
IM_ASSERT(g.IO.Font->IsLoaded()); // Font failed to load
g.IO.FontYOffset = +1;
}
g.Initialized = true;