Permalink
Browse files

Merge pull request #1054 from mdboom/doc_build_fail

 stix_fonts_demo.py fails with bad refcount
  • Loading branch information...
2 parents cbb11da + ca678a4 commit 8089e045ac1b5ad974cdc6618a106455d43942c4 @mdboom mdboom committed Aug 3, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/ft2font.cpp
View
@@ -870,24 +870,28 @@ FT2Font::FT2Font(std::string facefile) :
{
std::ostringstream s;
s << "Could not load facefile " << facefile << "; Unknown_File_Format" << std::endl;
+ ob_refcnt--;
throw Py::RuntimeError(s.str());
}
else if (error == FT_Err_Cannot_Open_Resource)
{
std::ostringstream s;
s << "Could not open facefile " << facefile << "; Cannot_Open_Resource" << std::endl;
+ ob_refcnt--;
throw Py::RuntimeError(s.str());
}
else if (error == FT_Err_Invalid_File_Format)
{
std::ostringstream s;
s << "Could not open facefile " << facefile << "; Invalid_File_Format" << std::endl;
+ ob_refcnt--;
throw Py::RuntimeError(s.str());
}
else if (error)
{
std::ostringstream s;
s << "Could not open facefile " << facefile << "; freetype error code " << error << std::endl;
+ ob_refcnt--;
throw Py::RuntimeError(s.str());
}
@@ -904,6 +908,7 @@ FT2Font::FT2Font(std::string facefile) :
{
std::ostringstream s;
s << "Could not set the fontsize for facefile " << facefile << std::endl;
+ ob_refcnt--;
throw Py::RuntimeError(s.str());
}

0 comments on commit 8089e04

Please sign in to comment.