summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-03-02 16:13:48 -0500
committerKohei Yoshida <kyoshida@novell.com>2011-03-02 16:14:54 -0500
commit2daf897af6b44e5b36619669377147af1e401cdd (patch)
tree5c6c6ffe05feca4bba78dc16e539542880932cce /chart2
parente9110d56c1a5f715275cfebfdda1ce99f75ed40a (diff)
Make sure these values are positive; we use them to resize arrays.
This fixes fdo#34350.
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/axes/TickmarkHelper.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/chart2/source/view/axes/TickmarkHelper.cxx b/chart2/source/view/axes/TickmarkHelper.cxx
index 0749c5b9c413..7ad0bcbf0cde 100644
--- a/chart2/source/view/axes/TickmarkHelper.cxx
+++ b/chart2/source/view/axes/TickmarkHelper.cxx
@@ -596,6 +596,9 @@ void TickmarkHelper::getAllTicks( ::std::vector< ::std::vector< TickInfo > >& rA
sal_Int32 nDepthCount = this->getTickDepth();
sal_Int32 nMaxMajorTickCount = this->getMaxTickCount( 0 );
+ if (nDepthCount <= 0 || nMaxMajorTickCount <= 0)
+ return;
+
aAllTicks.realloc(nDepthCount);
aAllTicks[0].realloc(nMaxMajorTickCount);