summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-09-25 01:05:14 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-09-25 02:53:58 +0200
commit217cb86dd06f0c539d6181d9b7fd0d71c4edd628 (patch)
tree35e292b4fd006200a19b6a6531eeebe80f6fa974
parent0e01d84c541513d695e0a9b896b4abc2a7b85545 (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>
-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
{