summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2018-12-04 14:26:18 +0000
committerJan-Marek Glogowski <glogow@fbihome.de>2018-12-04 19:08:02 +0100
commit9e2e6c27231f916fec349ff60cb0f2c12e0988ad (patch)
tree6ebb44851fd6a3cfedef68ee4923a010265a4f73 /vcl
parent23339ec77e38ebdae86eb05a2a3d9a3f5609df64 (diff)
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 <glogow@fbihome.de>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/outdev/text.cxx6
1 files changed, 6 insertions, 0 deletions
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;