Skip to content

Commit 0f74c7a

Browse files
committedFeb 6, 2021
Fix double free caused by CGUITTFont code
This partially reverts commit 2072afb. fixes #10920
1 parent d287da1 commit 0f74c7a

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed
 

‎src/irrlicht_changes/CGUITTFont.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,6 @@ bool CGUITTFont::load(const io::path& filename, const u32 size, const bool antia
378378
}
379379

380380
// Store our face.
381-
sguitt_face = face;
382381
tt_face = face->face;
383382

384383
// Store font metrics.
@@ -437,9 +436,6 @@ CGUITTFont::~CGUITTFont()
437436
// Drop our driver now.
438437
if (Driver)
439438
Driver->drop();
440-
441-
// Destroy sguitt_face after clearing c_faces
442-
delete sguitt_face;
443439
}
444440

445441
void CGUITTFont::reset_images()

‎src/irrlicht_changes/CGUITTFont.h

-1
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,6 @@ namespace gui
375375
gui::IGUIEnvironment* Environment;
376376
video::IVideoDriver* Driver;
377377
io::path filename;
378-
SGUITTFace* sguitt_face = nullptr;
379378
FT_Face tt_face;
380379
FT_Size_Metrics font_metrics;
381380
FT_Int32 load_flags;

0 commit comments

Comments
 (0)