From da6fa1d756b4fac76881250089dc48f6e9d2ac1c Mon Sep 17 00:00:00 2001 From: Ray Date: Fri, 22 Nov 2024 11:06:34 +0100 Subject: [PATCH] Fix #4529 --- src/rtext.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rtext.c b/src/rtext.c index 81bfe1a8..999557d3 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -1339,6 +1339,7 @@ Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing int GetGlyphIndex(Font font, int codepoint) { int index = 0; + if (!IsFontValid(font)) return index; #define SUPPORT_UNORDERED_CHARSET #if defined(SUPPORT_UNORDERED_CHARSET)