Merge pull request #4928 from JeffM2501/unload_default_font

[rtext] Properly clean up the default font on unload
This commit is contained in:
Ray 2025-05-10 21:47:53 +02:00 committed by GitHub
commit 4ac31f7cde
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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