File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -870,24 +870,28 @@ FT2Font::FT2Font(std::string facefile) :
870870 {
871871 std::ostringstream s;
872872 s << " Could not load facefile " << facefile << " ; Unknown_File_Format" << std::endl;
873+ ob_refcnt--;
873874 throw Py::RuntimeError (s.str ());
874875 }
875876 else if (error == FT_Err_Cannot_Open_Resource)
876877 {
877878 std::ostringstream s;
878879 s << " Could not open facefile " << facefile << " ; Cannot_Open_Resource" << std::endl;
880+ ob_refcnt--;
879881 throw Py::RuntimeError (s.str ());
880882 }
881883 else if (error == FT_Err_Invalid_File_Format)
882884 {
883885 std::ostringstream s;
884886 s << " Could not open facefile " << facefile << " ; Invalid_File_Format" << std::endl;
887+ ob_refcnt--;
885888 throw Py::RuntimeError (s.str ());
886889 }
887890 else if (error)
888891 {
889892 std::ostringstream s;
890893 s << " Could not open facefile " << facefile << " ; freetype error code " << error << std::endl;
894+ ob_refcnt--;
891895 throw Py::RuntimeError (s.str ());
892896 }
893897
@@ -904,6 +908,7 @@ FT2Font::FT2Font(std::string facefile) :
904908 {
905909 std::ostringstream s;
906910 s << " Could not set the fontsize for facefile " << facefile << std::endl;
911+ ob_refcnt--;
907912 throw Py::RuntimeError (s.str ());
908913 }
909914
You can’t perform that action at this time.
0 commit comments