diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-10 16:20:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-10 20:07:07 +0100 |
commit | 4a514e21eda561ab1025610ea492360d01cbd52d (patch) | |
tree | c96c1b8b58a3860ef294d12c32fabb0afb4071cc | |
parent | dc134874b62422729a6cbe62e48639e721eacfdf (diff) |
tdf#121263 Calc crashes when hide multiple sheets
regression from
commit 87c06415cebd707ae359cb2f1b06d468cb6afb08
clang-tidy performance-unnecessary-copy-init in sc
Change-Id: I49a7099c0a5e9e684008d2e799f9ee94f867d786
Reviewed-on: https://gerrit.libreoffice.org/63239
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sc/source/ui/view/viewfun2.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index ab51350ef3dd..565fa987e0e3 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -3045,7 +3045,8 @@ void ScViewFunc::HideTable( const ScMarkData& rMark ) ScMarkData::MarkedTabsType::const_iterator it; std::vector<SCTAB> undoTabs; - const ScMarkData::MarkedTabsType& selectedTabs = rMark.GetSelectedTabs(); + // need to take a copy of selectedtabs since it is modified in the loop + const ScMarkData::MarkedTabsType selectedTabs = rMark.GetSelectedTabs(); for (it=selectedTabs.begin(); it!=selectedTabs.end(); ++it) { nTab = *it; |