vcl/unx/generic/glyphs/glyphcache.cxx | 7 ------- 1 file changed, 7 deletions(-)
New commits: commit b0be0d419576c4ba2ad0f904592879a7736cbfaf Author: Khaled Hosny <khaledho...@eglug.org> Date: Tue May 8 22:21:07 2018 +0200 Blind attempt to fix UBSAN error in FreetypeFont The only place that calls FreetypeFontInstance::SetFreetypeFont() is FreetypeFont::FreetypeFont() calling it with “this”: static_cast<FreetypeFontInstance*>(mpFontInstance)->SetFreetypeFont( this ); So I don’t think we need to manage that FreetypeFont pointer, as it it is guaranteed to be valid as long as this FreetypeFontInstance is valid. Too many font classes and it is really hard to reason what is doing what… Change-Id: Iee50d2ecc4084116c13a2d2464594d6cffdcfcfe Reviewed-on: https://gerrit.libreoffice.org/54008 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/vcl/unx/generic/glyphs/glyphcache.cxx b/vcl/unx/generic/glyphs/glyphcache.cxx index ac2eaf5498e3..cff473c9036c 100644 --- a/vcl/unx/generic/glyphs/glyphcache.cxx +++ b/vcl/unx/generic/glyphs/glyphcache.cxx @@ -357,18 +357,11 @@ void FreetypeFontInstance::SetFreetypeFont(FreetypeFont* p) { if (p == mpFreetypeFont) return; - if (mpFreetypeFont) - mpFreetypeFont->Release(); mpFreetypeFont = p; - if (mpFreetypeFont) - mpFreetypeFont->AddRef(); } FreetypeFontInstance::~FreetypeFontInstance() { - // TODO: remove the FreetypeFont here instead of in the GlyphCache - if (mpFreetypeFont) - mpFreetypeFont->Release(); } static hb_blob_t* getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pUserData) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits