filter/source/graphicfilter/ios2met/ios2met.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 02fbfbc573bd29f46f0e0d39b86525089cfb43a9 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Jan 16 17:00:06 2017 +0000 ofz: ensure nOldSize is > 0 Change-Id: Iaf385c9cd4fd37d56879908c00c7483762d66a0b (cherry picked from commit dd70861fd7123c826feefa86f8af1da1f4877c97) Reviewed-on: https://gerrit.libreoffice.org/33177 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx index 6e09ee4..19c37f3 100644 --- a/filter/source/graphicfilter/ios2met/ios2met.cxx +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -510,7 +510,7 @@ void OS2METReader::AddPointsToArea(const tools::Polygon & rPoly) else { tools::Polygon aLastPoly(pPP->GetObject(pPP->Count()-1)); nOldSize=aLastPoly.GetSize(); - if (aLastPoly.GetPoint(nOldSize-1)==rPoly.GetPoint(0)) nOldSize--; + if (nOldSize && aLastPoly.GetPoint(nOldSize-1)==rPoly.GetPoint(0)) nOldSize--; nNewSize=nOldSize+rPoly.GetSize(); aLastPoly.SetSize(nNewSize); for (i=nOldSize; i<nNewSize; i++) { @@ -531,7 +531,7 @@ void OS2METReader::AddPointsToPath(const tools::Polygon & rPoly) else { tools::Polygon aLastPoly(pPP->GetObject(pPP->Count()-1)); nOldSize=aLastPoly.GetSize(); - if (aLastPoly.GetPoint(nOldSize-1)!=rPoly.GetPoint(0)) pPP->Insert(rPoly); + if (nOldSize && aLastPoly.GetPoint(nOldSize-1)!=rPoly.GetPoint(0)) pPP->Insert(rPoly); else { nOldSize--; nNewSize=nOldSize+rPoly.GetSize();
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits