summaryrefslogtreecommitdiffstats
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-18 14:11:11 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-01-18 14:11:14 +0000
commit2fb220093f7178f75ebd582bbcd956c1ee7e03db (patch)
tree1da34f7c4651c35c3af2e12eba51d2aedd34b84b /sc
parentfix up stub (diff)
downloadcore-2fb220093f7178f75ebd582bbcd956c1ee7e03db.tar.gz
core-2fb220093f7178f75ebd582bbcd956c1ee7e03db.zip
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
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/condformat/condformatdlg.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index b6e21914f5f2..6cc1d1efa147 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -376,10 +376,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;
}
}