From 2a994f1c811881920f9230212ea073db19d790db Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 20 Sep 2021 22:45:52 +0200 Subject: [PATCH] Backport freetype 2.11 fix from imgui. --- imgui/misc/freetype/imgui_freetype.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imgui/misc/freetype/imgui_freetype.cpp b/imgui/misc/freetype/imgui_freetype.cpp index 71a18870..06eb1758 100644 --- a/imgui/misc/freetype/imgui_freetype.cpp +++ b/imgui/misc/freetype/imgui_freetype.cpp @@ -539,7 +539,8 @@ bool ImFontAtlasBuildWithFreeTypeEx(FT_Library ft_library, ImFontAtlas* atlas, u // Render glyph into a bitmap (currently held by FreeType) const FT_Bitmap* ft_bitmap = src_tmp.Font.RenderGlyphAndGetInfo(&src_glyph.Info); - IM_ASSERT(ft_bitmap); + if (ft_bitmap == NULL) + continue; // Allocate new temporary chunk if needed const int bitmap_size_in_bytes = src_glyph.Info.Width * src_glyph.Info.Height * 4;