diff options
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/condformat/condformatdlg.cxx | 5 |
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; } } |