From ca678a49f37411b1b0e72d7d0dfa88c124b0e34b Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Fri, 3 Aug 2012 15:06:25 -0400 Subject: [PATCH] Reinstate the manual reference counting as discovered in #1054. --- src/ft2font.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ft2font.cpp b/src/ft2font.cpp index 7bfdadbe3db0..91dbb364fdd0 100644 --- a/src/ft2font.cpp +++ b/src/ft2font.cpp @@ -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()); } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy