Kaydet (Commit) 2fb22009 authored tarafından Caolán McNamara's avatar Caolán McNamara

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
üst f9d914c1
...@@ -376,10 +376,11 @@ IMPL_LINK_NOARG( ScCondFormatList, RemoveBtnHdl, Button*, void ) ...@@ -376,10 +376,11 @@ IMPL_LINK_NOARG( ScCondFormatList, RemoveBtnHdl, Button*, void )
{ {
for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr) for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
{ {
if((*itr)->IsSelected()) auto widget = *itr;
if (widget->IsSelected())
{ {
itr->disposeAndClear();
maEntries.erase(itr); maEntries.erase(itr);
widget.disposeAndClear();
break; break;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment