diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-10-10 09:33:33 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-10-10 15:42:09 -0400 |
commit | 424fb26da3603a5ec702b96fc0dcc2458706e84d (patch) | |
tree | c075b27ae7acf0e196af5d7b18b4d2f07076e33d | |
parent | eb2c2f1a3c1a6c829d75418ec1578d15f7895485 (diff) |
Make this a hard prerequisite.
Change-Id: Ib1c859b6033b2cf148e1ed74a437dda85872dffe
-rw-r--r-- | chart2/source/view/main/ChartView.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 01d3cf8c0b74..e693deeb95f1 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -658,8 +658,9 @@ void SeriesPlotterContainer::updateScalesAndIncrementsOnAxes() void SeriesPlotterContainer::doAutoScaling( ChartModel& rChartModel ) { - //precondition: need a initialized m_aSeriesPlotterList - //precondition: need a initialized m_aAxisUsageList + if (m_aSeriesPlotterList.empty() || m_aAxisUsageList.empty()) + // We need these two containers populated to do auto-scaling. Bail out. + return; ::std::map< uno::Reference< XAxis >, AxisUsage >::iterator aAxisIter = m_aAxisUsageList.begin(); const ::std::map< uno::Reference< XAxis >, AxisUsage >::const_iterator aAxisEndIter = m_aAxisUsageList.end(); |