8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9a42b8d + ec2212e commit 9d648fcCopy full SHA for 9d648fc
src/ft2font.cpp
@@ -850,6 +850,7 @@ PYCXX_NOARGS_METHOD_DECL(FT2Font, get_path)
850
851
FT2Font::FT2Font(Py::PythonClassInstance *self, Py::Tuple &args, Py::Dict &kwds) :
852
Py::PythonClass<FT2Font>(self, args, kwds),
853
+ face(NULL),
854
image()
855
{
856
FT_Open_Args open_args;
@@ -979,11 +980,13 @@ FT2Font::~FT2Font()
979
980
981
_VERBOSE("FT2Font::~FT2Font");
982
- FT_Done_Face(face);
983
+ if (face) {
984
+ FT_Done_Face(face);
985
- for (size_t i = 0; i < glyphs.size(); i++)
- {
986
- FT_Done_Glyph(glyphs[i]);
+ for (size_t i = 0; i < glyphs.size(); i++)
987
+ {
988
+ FT_Done_Glyph(glyphs[i]);
989
+ }
990
}
991
992
if (stream.descriptor.pointer != NULL) {
0 commit comments