[Libreoffice-commits] core.git: sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Nov 10 19:07:28 UTC 2018


 sc/source/ui/view/viewfun2.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 4a514e21eda561ab1025610ea492360d01cbd52d
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sat Nov 10 16:20:11 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Nov 10 20:07:07 2018 +0100

    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 at collabora.co.uk>

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;


More information about the Libreoffice-commits mailing list