Skip to content

Commit bbc5e66

Browse files
committed
Backport 98ee4e9 to v1.1.x branch
1 parent 0cfea91 commit bbc5e66

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/ft2font.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -831,28 +831,24 @@ FT2Font::FT2Font(std::string facefile) :
831831
{
832832
std::ostringstream s;
833833
s << "Could not load facefile " << facefile << "; Unknown_File_Format" << std::endl;
834-
ob_refcnt--;
835834
throw Py::RuntimeError(s.str());
836835
}
837836
else if (error == FT_Err_Cannot_Open_Resource)
838837
{
839838
std::ostringstream s;
840839
s << "Could not open facefile " << facefile << "; Cannot_Open_Resource" << std::endl;
841-
ob_refcnt--;
842840
throw Py::RuntimeError(s.str());
843841
}
844842
else if (error == FT_Err_Invalid_File_Format)
845843
{
846844
std::ostringstream s;
847845
s << "Could not open facefile " << facefile << "; Invalid_File_Format" << std::endl;
848-
ob_refcnt--;
849846
throw Py::RuntimeError(s.str());
850847
}
851848
else if (error)
852849
{
853850
std::ostringstream s;
854851
s << "Could not open facefile " << facefile << "; freetype error code " << error << std::endl;
855-
ob_refcnt--;
856852
throw Py::RuntimeError(s.str());
857853
}
858854

@@ -869,7 +865,6 @@ FT2Font::FT2Font(std::string facefile) :
869865
{
870866
std::ostringstream s;
871867
s << "Could not set the fontsize for facefile " << facefile << std::endl;
872-
ob_refcnt--;
873868
throw Py::RuntimeError(s.str());
874869
}
875870

0 commit comments

Comments
 (0)