Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix double free caused by CGUITTFont code
This partially reverts commit 2072afb.
fixes #10920
  • Loading branch information
sfan5 committed Feb 6, 2021
1 parent d287da1 commit 0f74c7a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
4 changes: 0 additions & 4 deletions src/irrlicht_changes/CGUITTFont.cpp
Expand Up @@ -378,7 +378,6 @@ 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.
Expand Down Expand Up @@ -437,9 +436,6 @@ CGUITTFont::~CGUITTFont()
// Drop our driver now.
if (Driver)
Driver->drop();

// Destroy sguitt_face after clearing c_faces
delete sguitt_face;
}

void CGUITTFont::reset_images()
Expand Down
1 change: 0 additions & 1 deletion src/irrlicht_changes/CGUITTFont.h
Expand Up @@ -375,7 +375,6 @@ 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;
Expand Down

0 comments on commit 0f74c7a

Please sign in to comment.