[Libreoffice-commits] core.git: Branch 'libreoffice-5-3-0' - sc/source

Caolán McNamara caolanm at redhat.com
Wed Jan 25 13:09:16 UTC 2017


 sc/source/ui/condformat/condformatdlg.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 226838107364db2139363ea9617b06f74a13e122
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jan 18 14:11:11 2017 +0000

    Resolves: tdf#105411 remove from entries before dispose
    
    cause on dispose all the state change callbacks are
    called, and all of the conditional formatting code assumes
    that if there's an entry in the entries, that its not an
    empty disposed one
    
    Change-Id: I50d85128ba884a0719959f2d6e7ae83d6fb3431c
    (cherry picked from commit 2fb220093f7178f75ebd582bbcd956c1ee7e03db)
    Reviewed-on: https://gerrit.libreoffice.org/33476
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit cb65b1fa2ac641d0cb4c589db2f4b3a4df0d6b07)
    Reviewed-on: https://gerrit.libreoffice.org/33482
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index 8e952d7..37bf0b2 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -380,10 +380,11 @@ IMPL_LINK_NOARG( ScCondFormatList, RemoveBtnHdl, Button*, void )
 {
     for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
     {
-        if((*itr)->IsSelected())
+        auto widget = *itr;
+        if (widget->IsSelected())
         {
-            itr->disposeAndClear();
             maEntries.erase(itr);
+            widget.disposeAndClear();
             break;
         }
     }


More information about the Libreoffice-commits mailing list