summaryrefslogtreecommitdiff
path: root/chart2/source/view/axes/Tickmarks_Equidistant.hxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-09-25 01:05:14 +0200
committerCaolán McNamara <caolanm@redhat.com>2018-10-04 11:03:01 +0200
commitb86f5f438f1a6973830d2a588f6c5356b3c70bcf (patch)
tree308d4ad9f0848c9595425f126a3bfca4a6221a6e /chart2/source/view/axes/Tickmarks_Equidistant.hxx
parent20c72c0f79fa1d416c68537ecb914f197228eea5 (diff)
tdf#120015, don't crash without major tick marks
Change-Id: Icac79eb1c0c47388f96d37d2921c81fb6c848607 Reviewed-on: https://gerrit.libreoffice.org/60948 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 217cb86dd06f0c539d6181d9b7fd0d71c4edd628) Reviewed-on: https://gerrit.libreoffice.org/60962 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'chart2/source/view/axes/Tickmarks_Equidistant.hxx')
-rw-r--r--chart2/source/view/axes/Tickmarks_Equidistant.hxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/chart2/source/view/axes/Tickmarks_Equidistant.hxx b/chart2/source/view/axes/Tickmarks_Equidistant.hxx
index 72897c048311..4c89d4b44251 100644
--- a/chart2/source/view/axes/Tickmarks_Equidistant.hxx
+++ b/chart2/source/view/axes/Tickmarks_Equidistant.hxx
@@ -57,7 +57,11 @@ private: //methods
if(m_pSimpleTicks)
return (*m_pSimpleTicks)[nDepth][nIndex];
else
+ {
+ if ((*m_pInfoTicks)[nDepth].size() <= size_t(nIndex))
+ return std::numeric_limits<double>::max();
return (((*m_pInfoTicks)[nDepth])[nIndex]).fScaledTickValue;
+ }
}
sal_Int32 getTickCount( sal_Int32 nDepth ) const
{