1 parent f226149 commit eff9217Copy full SHA for eff9217
1 file changed
src/ft2font.cpp
@@ -846,6 +846,7 @@ PYCXX_NOARGS_METHOD_DECL(FT2Font, get_path)
846
847
FT2Font::FT2Font(Py::PythonClassInstance *self, Py::Tuple &args, Py::Dict &kwds) :
848
Py::PythonClass<FT2Font>(self, args, kwds),
849
+ face(NULL),
850
image()
851
{
852
FT_Open_Args open_args;
@@ -975,7 +976,9 @@ FT2Font::~FT2Font()
975
976
977
_VERBOSE("FT2Font::~FT2Font");
978
- FT_Done_Face(face);
979
+ if (face) {
980
+ FT_Done_Face(face);
981
+ }
982
983
for (size_t i = 0; i < glyphs.size(); i++)
984
0 commit comments