diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx index 635417bba2db..10be4a0f3c20 100644 --- a/vcl/source/glyphs/graphite_layout.cxx +++ b/vcl/source/glyphs/graphite_layout.cxx @@ -689,6 +689,12 @@ void GraphiteLayout::ApplyDXArray(ImplLayoutArgs &args, std::vector & rDelt for (int i = startGi; i < endGi; ++i) { + if (i < 0) + { + SAL_WARN( "vcl.gdi", "Negative index" ); + continue; + } + // calculate visual cluster bounds int firstChar = mvGlyph2Char[i]; int nBaseGlyph = mvChar2BaseGlyph[firstChar - mnMinCharPos];