forked from Mirrorlandia_minetest/minetest
Fix double free caused by CGUITTFont code
This partially reverts commit 2072afb72b4b3e9c5dcbcec71d824aeae1b35d19. fixes #10920
This commit is contained in:
parent
d287da184c
commit
0f74c7a977
@ -378,7 +378,6 @@ bool CGUITTFont::load(const io::path& filename, const u32 size, const bool antia
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Store our face.
|
// Store our face.
|
||||||
sguitt_face = face;
|
|
||||||
tt_face = face->face;
|
tt_face = face->face;
|
||||||
|
|
||||||
// Store font metrics.
|
// Store font metrics.
|
||||||
@ -437,9 +436,6 @@ CGUITTFont::~CGUITTFont()
|
|||||||
// Drop our driver now.
|
// Drop our driver now.
|
||||||
if (Driver)
|
if (Driver)
|
||||||
Driver->drop();
|
Driver->drop();
|
||||||
|
|
||||||
// Destroy sguitt_face after clearing c_faces
|
|
||||||
delete sguitt_face;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGUITTFont::reset_images()
|
void CGUITTFont::reset_images()
|
||||||
|
@ -375,7 +375,6 @@ namespace gui
|
|||||||
gui::IGUIEnvironment* Environment;
|
gui::IGUIEnvironment* Environment;
|
||||||
video::IVideoDriver* Driver;
|
video::IVideoDriver* Driver;
|
||||||
io::path filename;
|
io::path filename;
|
||||||
SGUITTFace* sguitt_face = nullptr;
|
|
||||||
FT_Face tt_face;
|
FT_Face tt_face;
|
||||||
FT_Size_Metrics font_metrics;
|
FT_Size_Metrics font_metrics;
|
||||||
FT_Int32 load_flags;
|
FT_Int32 load_flags;
|
||||||
|
Loading…
Reference in New Issue
Block a user