summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vcl/source/glyphs/graphite_layout.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index 4edeb9af731e..429e700afa50 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -849,7 +849,11 @@ void GraphiteLayout::expandOrCondense(ImplLayoutArgs &rArgs)
nOffset = static_cast<int>(fExtraPerCluster * nCluster);
int nCharIndex = mvGlyph2Char[i];
assert(nCharIndex > -1);
- mvCharDxs[nCharIndex-mnMinCharPos] += nOffset;
+ if (static_cast<size_t>(nCharIndex-mnMinCharPos)
+ < mvCharDxs.size())
+ {
+ mvCharDxs[nCharIndex-mnMinCharPos] += nOffset;
+ }
// adjust char dxs for rest of characters in cluster
while (++nCharIndex - mnMinCharPos < static_cast<int>(mvChar2BaseGlyph.size()))
{