Browse Source

Merge pull request #766 from Skabunkel/master

#764 - Quick fix that clears alot of memory.
pull/767/head
Ray 5 years ago
committed by GitHub
parent
commit
56c79a10de
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      src/text.c

+ 4
- 0
src/text.c View File

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

Loading…
Cancel
Save