From 9c707b6d8f2eed797f57cbe936d204964257b542 Mon Sep 17 00:00:00 2001 From: omar Date: Fri, 14 Nov 2014 11:22:35 +0900 Subject: [PATCH] Added assert to catch font data loading failure in a location that's easier to understand --- imgui.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/imgui.cpp b/imgui.cpp index f5ce8d61..5ca7cda8 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -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;