aboutsummaryrefslogtreecommitdiff
path: root/src/irrlicht_changes
diff options
context:
space:
mode:
Diffstat (limited to 'src/irrlicht_changes')
-rw-r--r--src/irrlicht_changes/CGUITTFont.cpp4
-rw-r--r--src/irrlicht_changes/CGUITTFont.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/irrlicht_changes/CGUITTFont.cpp b/src/irrlicht_changes/CGUITTFont.cpp
index bd4e700de..0f3368822 100644
--- a/src/irrlicht_changes/CGUITTFont.cpp
+++ b/src/irrlicht_changes/CGUITTFont.cpp
@@ -378,6 +378,7 @@ bool CGUITTFont::load(const io::path& filename, const u32 size, const bool antia
}
// Store our face.
+ sguitt_face = face;
tt_face = face->face;
// Store font metrics.
@@ -436,6 +437,9 @@ CGUITTFont::~CGUITTFont()
// Drop our driver now.
if (Driver)
Driver->drop();
+
+ // Destroy sguitt_face after clearing c_faces
+ delete sguitt_face;
}
void CGUITTFont::reset_images()
diff --git a/src/irrlicht_changes/CGUITTFont.h b/src/irrlicht_changes/CGUITTFont.h
index 310f74f67..b64e57a45 100644
--- a/src/irrlicht_changes/CGUITTFont.h
+++ b/src/irrlicht_changes/CGUITTFont.h
@@ -375,6 +375,7 @@ namespace gui
gui::IGUIEnvironment* Environment;
video::IVideoDriver* Driver;
io::path filename;
+ SGUITTFace* sguitt_face = nullptr;
FT_Face tt_face;
FT_Size_Metrics font_metrics;
FT_Int32 load_flags;