diff --git a/Components/Overlay/src/OgreFont.cpp b/Components/Overlay/src/OgreFont.cpp index 2eb7d422705..97511dd34a7 100644 --- a/Components/Overlay/src/OgreFont.cpp +++ b/Components/Overlay/src/OgreFont.cpp @@ -528,6 +528,13 @@ namespace Ogre // Advance a column if(width) l += (width + char_spacer); + +#ifndef HAVE_FREETYPE + if (buffer != NULL) + { + STBTT_free(buffer, font.userdata); + } +#endif } } #ifdef HAVE_FREETYPE