From 842837e35b421a4c85ca30f6840321f0a3c5a029 Mon Sep 17 00:00:00 2001 From: Pascal Thomet Date: Mon, 16 Jun 2025 18:36:33 +0200 Subject: [PATCH] imgui_freetype: fix conversion null -> bool in FontBakedLoadGlyph (#8696) --- misc/freetype/imgui_freetype.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/freetype/imgui_freetype.cpp b/misc/freetype/imgui_freetype.cpp index ae87f63f9..d7d50db39 100644 --- a/misc/freetype/imgui_freetype.cpp +++ b/misc/freetype/imgui_freetype.cpp @@ -501,7 +501,7 @@ bool ImGui_ImplFreeType_FontBakedLoadGlyph(ImFontAtlas* atlas, ImFontConfig* src FT_Error error = FT_Render_Glyph(slot, render_mode); const FT_Bitmap* ft_bitmap = &slot->bitmap; if (error != 0 || ft_bitmap == nullptr) - return NULL; + return false; const int w = (int)ft_bitmap->width; const int h = (int)ft_bitmap->rows; @@ -520,7 +520,7 @@ bool ImGui_ImplFreeType_FontBakedLoadGlyph(ImFontAtlas* atlas, ImFontConfig* src { // Pathological out of memory case (TexMaxWidth/TexMaxHeight set too small?) IM_ASSERT(pack_id != ImFontAtlasRectId_Invalid && "Out of texture memory."); - return NULL; + return false; } ImTextureRect* r = ImFontAtlasPackGetRect(atlas, pack_id);