diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2013-04-29 22:13:44 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2013-04-29 22:20:52 +0200 |
commit | 3719396649c8c944727f89c517a8191cd37b2499 (patch) | |
tree | 64c5f445dc6e38cec2562f2969a35d2d5ea5008d /vcl | |
parent | bfa6aab3992dfca2312ffd626d975b25f84544fe (diff) |
[harfbuzz] Don't crash when closing LibreOffice
We shouldn't be trying to free the font table buffer when destroying the
blob, so pass NULL for destroy function instead of free(), and also use
HB_MEMORY_MODE_READONLY just to be safe.
Change-Id: I85b5a575249b4efc0f5799db205ee17cbeb66d22
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/generic/glyphs/gcach_layout.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx index abd1ab81b67a..5fea884eb2c5 100644 --- a/vcl/generic/glyphs/gcach_layout.cxx +++ b/vcl/generic/glyphs/gcach_layout.cxx @@ -220,7 +220,7 @@ static hb_blob_t *getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pU hb_blob_t* pBlob = NULL; if (pBuffer != NULL) - pBlob = hb_blob_create((const char*) pBuffer, nLength, HB_MEMORY_MODE_WRITABLE, (void*) pBuffer, free); + pBlob = hb_blob_create((const char*) pBuffer, nLength, HB_MEMORY_MODE_READONLY, (void*) pBuffer, NULL); return pBlob; } |