vcl/unx/generic/glyphs/glyphcache.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit 3220ada5159307be8a93da3a57d2bfec0c826bf5 Author: Caolán McNamara <caol...@redhat.com> Date: Fri Jun 1 13:34:38 2018 +0100 Revert "Blind attempt to fix UBSAN error in FreetypeFont" to see if this is still a problem after 'fix dubious cache comparison check' This reverts commit b0be0d419576c4ba2ad0f904592879a7736cbfaf. Change-Id: I253a67c3aa5f8daf0e8cd586a5089e554e48f355 Reviewed-on: https://gerrit.libreoffice.org/55185 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/generic/glyphs/glyphcache.cxx b/vcl/unx/generic/glyphs/glyphcache.cxx index cff473c9036c..ac2eaf5498e3 100644 --- a/vcl/unx/generic/glyphs/glyphcache.cxx +++ b/vcl/unx/generic/glyphs/glyphcache.cxx @@ -357,11 +357,18 @@ 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