mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-29 20:21:40 +01:00 
			
		
		
		
	Added assert to catch font data loading failure in a location that's easier to understand
This commit is contained in:
		| @@ -1333,6 +1333,7 @@ void ImGui::NewFrame() | |||||||
|             g.IO.Font = (ImBitmapFont*)ImGui::MemAlloc(sizeof(ImBitmapFont)); |             g.IO.Font = (ImBitmapFont*)ImGui::MemAlloc(sizeof(ImBitmapFont)); | ||||||
|             new(g.IO.Font) ImBitmapFont(); |             new(g.IO.Font) ImBitmapFont(); | ||||||
|             g.IO.Font->LoadFromMemory(fnt_data, fnt_size); |             g.IO.Font->LoadFromMemory(fnt_data, fnt_size); | ||||||
|  | 			IM_ASSERT(g.IO.Font->IsLoaded());       // Font failed to load | ||||||
|             g.IO.FontYOffset = +1; |             g.IO.FontYOffset = +1; | ||||||
|         } |         } | ||||||
|         g.Initialized = true; |         g.Initialized = true; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user