From ef2f40f5583875ca86f41747b79e4385c997601f Mon Sep 17 00:00:00 2001 From: David Tardon Date: Mon, 16 May 2016 10:00:17 +0200 Subject: [PATCH] stop right away if there are no points Change-Id: I099db29c066392f53935f78f62c122f7176aaea2 --- chart2/source/view/charttypes/VSeriesPlotter.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 2f736785b503..8af02b0c1762 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -1953,6 +1953,8 @@ void VDataSeriesGroup::calculateYMinAndMaxForCategoryRange( if(nStartCategoryIndex<0) nStartCategoryIndex=0; const sal_Int32 nPointCount = getPointCount();//necessary to create m_aListOfCachedYValues + if(nPointCount <= 0) + return; if (nEndCategoryIndex >= nPointCount) nEndCategoryIndex = nPointCount - 1; if(nEndCategoryIndex<0)