vcl/source/outdev/text.cxx | 6 ++++++ 1 file changed, 6 insertions(+) New commits: commit 9e2e6c27231f916fec349ff60cb0f2c12e0988ad Author: Jan-Marek Glogowski <glo...@fbihome.de> AuthorDate: Tue Dec 4 14:26:18 2018 +0000 Commit: Jan-Marek Glogowski <glo...@fbihome.de> CommitDate: Tue Dec 4 19:08:02 2018 +0100
tdf#121815 just use valid cached layout glyphs I'm not exacly sure when and why the font cache is invalidated, but as a result this also invalidates the cached layouted glyphs. So just check the glyph layout cache state before trying to use it. But actually the status bar should update it's cache, so I'm not sure where to really put the fix. At least this won't crash LO anymore. Change-Id: I5f3ff8b9d56808af74d1419e878819d6019cd893 Reviewed-on: https://gerrit.libreoffice.org/64529 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de> diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 5c3cdf64fc53..c826126d4b27 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -1236,6 +1236,12 @@ std::unique_ptr<SalLayout> OutputDevice::ImplLayout(const OUString& rOrigStr, vcl::TextLayoutCache const* pLayoutCache, const SalLayoutGlyphs* pGlyphs) const { + if (pGlyphs && !pGlyphs->IsValid()) + { + SAL_WARN("vcl", "Trying to setup invalid cached glyphs - falling back to relayout!"); + pGlyphs = nullptr; + } + if (!InitFont()) return nullptr; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits