From ebaa922f6b53bde2ce8e0a047c72fe9670d71ef9 Mon Sep 17 00:00:00 2001 From: Jeffery Myers Date: Thu, 8 May 2025 09:57:31 -0700 Subject: [PATCH] Properly clean up the default font on unload, it may be reused if the window is created again --- src/rtext.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rtext.c b/src/rtext.c index 4ee9b34b6..551583b95 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -331,6 +331,9 @@ extern void UnloadFontDefault(void) if (isGpuReady) UnloadTexture(defaultFont.texture); RL_FREE(defaultFont.glyphs); RL_FREE(defaultFont.recs); + defaultFont.glyphCount = 0; + defaultFont.glyphs = NULL; + defaultFont.recs = NULL; } #endif // SUPPORT_DEFAULT_FONT