diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2015-04-13 20:29:25 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-04-14 20:06:49 +0000 |
commit | 7c19d748285f033dbc3bbbb98070018ce45833a0 (patch) | |
tree | 548ea7e2a7e79c24c1becd50423b2a576f8e7073 /sfx2 | |
parent | f12510bf60c2261e8d7d3b843c815b12d411601e (diff) |
Cherry-pick 2 fixes:
tdf#90566: memory leak: maChangeListeners is not properly disposed
cbbb24d0afcdbdac21d03ec4ee1455a3834afff4
fix loop
d170afda29bf4557df568732b1feba47f2c9439f
Change-Id: Ie575d503349b3218c7a0211e1f81d791e995297e
Reviewed-on: https://gerrit.libreoffice.org/15290
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/sidebar/Theme.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx index 4acbe851528e..262f363408a5 100644 --- a/sfx2/source/sidebar/Theme.cxx +++ b/sfx2/source/sidebar/Theme.cxx @@ -429,15 +429,15 @@ void Theme::UpdateTheme (void) void SAL_CALL Theme::disposing (void) { ChangeListeners aListeners; - maChangeListeners.swap(aListeners); + aListeners.swap(maChangeListeners); const lang::EventObject aEvent (static_cast<XWeak*>(this)); for (ChangeListeners::const_iterator - iContainer(maChangeListeners.begin()), - iContainerEnd(maChangeListeners.end()); - iContainerEnd!=iContainerEnd; - ++iContainerEnd) + iContainer(aListeners.begin()), + iContainerEnd(aListeners.end()); + iContainer != iContainerEnd; + ++iContainer) { for (ChangeListenerContainer::const_iterator iListener(iContainer->second.begin()), |