From c3565154c1e1140af85aaa3472d5830f5f802be0 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Fri, 15 Apr 2011 12:39:25 +0200 Subject: fdo#34350 make sure these values are positive Apply the original commit 1e3b1a7a8c939a0ae08a14d5efdd65b17355dae9 to the right file. --- chart2/source/view/axes/Tickmarks_Equidistant.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'chart2') diff --git a/chart2/source/view/axes/Tickmarks_Equidistant.cxx b/chart2/source/view/axes/Tickmarks_Equidistant.cxx index 9344af1ffac9..0273c9a678be 100644 --- a/chart2/source/view/axes/Tickmarks_Equidistant.cxx +++ b/chart2/source/view/axes/Tickmarks_Equidistant.cxx @@ -328,6 +328,9 @@ void EquidistantTickFactory::getAllTicks( ::std::vector< ::std::vector< TickInfo sal_Int32 nDepthCount = this->getTickDepth(); sal_Int32 nMaxMajorTickCount = this->getMaxTickCount( 0 ); + if (nDepthCount <= 0 || nMaxMajorTickCount <= 0) + return; + aAllTicks.realloc(nDepthCount); aAllTicks[0].realloc(nMaxMajorTickCount); -- cgit