diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2022-04-08 12:35:45 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2022-04-09 00:37:09 +0200 |
commit | bc0acc7bd02057f3c04af39530ee0fe235353576 (patch) | |
tree | 17183345e044cbcbf223e2a424525b7821ad7730 /vcl | |
parent | de45c09a3b48e8ab3ac995ea72681ec265c24123 (diff) |
cache failures in SalLayoutGlyphsCache too
Change-Id: I0ddbb8ac94705d7a1a843fe39d0821644dfb5084
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132743
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/impglyphitem.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vcl/source/gdi/impglyphitem.cxx b/vcl/source/gdi/impglyphitem.cxx index 86284c256e64..e78d23b68676 100644 --- a/vcl/source/gdi/impglyphitem.cxx +++ b/vcl/source/gdi/impglyphitem.cxx @@ -142,7 +142,12 @@ SalLayoutGlyphsCache::GetLayoutGlyphs(VclPtr<const OutputDevice> outputDevice, c assert(mCachedGlyphs.find(key) == mCachedGlyphs.begin()); // newly inserted item is first return &mCachedGlyphs.begin()->second; } - return nullptr; + else + { + // Failure, cache it too as invalid glyphs. + mCachedGlyphs.insert(std::make_pair(key, SalLayoutGlyphs())); + return nullptr; + } } SalLayoutGlyphsCache::CachedGlyphsKey::CachedGlyphsKey(const VclPtr<const OutputDevice>& d, |