summaryrefslogtreecommitdiffhomepage
path: root/src/text.c
diff options
context:
space:
mode:
authorSkabunkel <>2019-02-24 00:13:50 +0100
committerSkabunkel <>2019-02-24 00:13:50 +0100
commit795c5e949d18b8ae4753cd95ad1aa96b4f399c60 (patch)
treec7c3664c29abe34a381a6dca8f402b14702ec8b3 /src/text.c
parent854e5d2f7efff4fbd661a47825b8d1e3d70b4fa3 (diff)
downloadraylib-795c5e949d18b8ae4753cd95ad1aa96b4f399c60.tar.gz
raylib-795c5e949d18b8ae4753cd95ad1aa96b4f399c60.zip
#764 - Quick fix that clears alot of memory, there seems to be more hiding somewhere else.
Diffstat (limited to 'src/text.c')
-rw-r--r--src/text.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/text.c b/src/text.c
index 39582db2..db7be366 100644
--- a/src/text.c
+++ b/src/text.c
@@ -684,6 +684,10 @@ void UnloadFont(Font font)
// NOTE: Make sure spriteFont is not default font (fallback)
if (font.texture.id != GetFontDefault().texture.id)
{
+ for (int i = 0; i < font.charsCount; i++)
+ {
+ free(font.chars[i].data);
+ }
UnloadTexture(font.texture);
free(font.chars);