Ray 9 月之前
父节点
当前提交
da6fa1d756
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/rtext.c

+ 1 - 0
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)