File tree 1 file changed +5
-0
lines changed
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -870,24 +870,28 @@ FT2Font::FT2Font(std::string facefile) :
870
870
{
871
871
std::ostringstream s;
872
872
s << " Could not load facefile " << facefile << " ; Unknown_File_Format" << std::endl;
873
+ ob_refcnt--;
873
874
throw Py::RuntimeError (s.str ());
874
875
}
875
876
else if (error == FT_Err_Cannot_Open_Resource)
876
877
{
877
878
std::ostringstream s;
878
879
s << " Could not open facefile " << facefile << " ; Cannot_Open_Resource" << std::endl;
880
+ ob_refcnt--;
879
881
throw Py::RuntimeError (s.str ());
880
882
}
881
883
else if (error == FT_Err_Invalid_File_Format)
882
884
{
883
885
std::ostringstream s;
884
886
s << " Could not open facefile " << facefile << " ; Invalid_File_Format" << std::endl;
887
+ ob_refcnt--;
885
888
throw Py::RuntimeError (s.str ());
886
889
}
887
890
else if (error)
888
891
{
889
892
std::ostringstream s;
890
893
s << " Could not open facefile " << facefile << " ; freetype error code " << error << std::endl;
894
+ ob_refcnt--;
891
895
throw Py::RuntimeError (s.str ());
892
896
}
893
897
@@ -904,6 +908,7 @@ FT2Font::FT2Font(std::string facefile) :
904
908
{
905
909
std::ostringstream s;
906
910
s << " Could not set the fontsize for facefile " << facefile << std::endl;
911
+ ob_refcnt--;
907
912
throw Py::RuntimeError (s.str ());
908
913
}
909
914
You can’t perform that action at this time.
0 commit comments