summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2011-04-15 12:39:25 +0200
committerDavid Tardon <dtardon@redhat.com>2011-04-15 12:46:04 +0200
commitc3565154c1e1140af85aaa3472d5830f5f802be0 (patch)
treeba6b5237875ac31a99f9270f49714051f4d15784 /chart2
parent1d358f105d42ed0bc68cd024c4da0b0395bf72bc (diff)
fdo#34350 make sure these values are positive
Apply the original commit 1e3b1a7a8c939a0ae08a14d5efdd65b17355dae9 to the right file.
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/axes/Tickmarks_Equidistant.cxx3
1 files changed, 3 insertions, 0 deletions
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);