Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 61423d0

Browse files
committed
Backing out Glyph object leak fix, since it causes segfaults with PDF
backend. Will look into it further. svn path=/trunk/matplotlib/; revision=4923
1 parent 28ff600 commit 61423d0

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/ft2font.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,6 +1036,7 @@ FT2Font::get_glyph(const Py::Tuple & args){
10361036
if ( (size_t)num >= gms.size())
10371037
throw Py::ValueError("Glyph index out of range");
10381038

1039+
Py_INCREF(gms[num]);
10391040
return Py::asObject(gms[num]);
10401041
}
10411042

@@ -1093,6 +1094,7 @@ FT2Font::load_char(const Py::Tuple & args, const Py::Dict & kwargs) {
10931094
glyphs.push_back(thisGlyph);
10941095
Glyph* gm = new Glyph(face, thisGlyph, num);
10951096
gms.push_back(gm);
1097+
Py_INCREF(gm);
10961098
return Py::asObject( gm);
10971099
}
10981100

0 commit comments

Comments
 (0)