diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-02-08 01:13:56 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-02-09 07:30:31 +0100 |
commit | cdc44358a5a2530eb2c8bb6beb90b00cc8c1b6cb (patch) | |
tree | f776388622ac558cb4fa9bc7be9b1a65e5fb367f | |
parent | df835773fa8d66a1bd534c5b374ac27552751941 (diff) |
always check whether pChartListenerCollection is not a nullptr
Change-Id: Ibe3ade28884b4e1264cd5a5a68a8e428ee3d9a48
Reviewed-on: https://gerrit.libreoffice.org/49454
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r-- | sc/source/core/data/document.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 7d1f821de849..7ebdb404d7e8 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -764,7 +764,8 @@ bool ScDocument::DeleteTab( SCTAB nTab ) SetAllFormulasDirty(aFormulaDirtyCxt); } // sheet names of references are not valid until sheet is deleted - pChartListenerCollection->UpdateScheduledSeriesRanges(); + if (pChartListenerCollection) + pChartListenerCollection->UpdateScheduledSeriesRanges(); if (comphelper::LibreOfficeKit::isActive()) { @@ -864,7 +865,8 @@ bool ScDocument::DeleteTabs( SCTAB nTab, SCTAB nSheets ) SetAllFormulasDirty(aFormulaDirtyCxt); } // sheet names of references are not valid until sheet is deleted - pChartListenerCollection->UpdateScheduledSeriesRanges(); + if (pChartListenerCollection) + pChartListenerCollection->UpdateScheduledSeriesRanges(); if (comphelper::LibreOfficeKit::isActive()) { @@ -1367,7 +1369,7 @@ bool ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab, bRet = true; } SetAutoCalc( bOldAutoCalc ); - if ( bRet ) + if ( bRet && pChartListenerCollection ) pChartListenerCollection->UpdateDirtyCharts(); return bRet; } @@ -1475,7 +1477,8 @@ void ScDocument::DeleteRow( SCCOL nStartCol, SCTAB nStartTab, std::for_each(maTabs.begin(), maTabs.end(), BroadcastRecalcOnRefMoveHandler( this)); } - pChartListenerCollection->UpdateDirtyCharts(); + if (pChartListenerCollection) + pChartListenerCollection->UpdateDirtyCharts(); } void ScDocument::DeleteRow( const ScRange& rRange ) @@ -1676,7 +1679,8 @@ void ScDocument::DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTA std::for_each(maTabs.begin(), maTabs.end(), BroadcastRecalcOnRefMoveHandler( this)); } - pChartListenerCollection->UpdateDirtyCharts(); + if (pChartListenerCollection) + pChartListenerCollection->UpdateDirtyCharts(); } void ScDocument::DeleteCol( const ScRange& rRange ) |