diff options
Diffstat (limited to 'svtools/source/control/headbar.cxx')
-rw-r--r-- | svtools/source/control/headbar.cxx | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx index 79393103dc4f..311003eeb5f2 100644 --- a/svtools/source/control/headbar.cxx +++ b/svtools/source/control/headbar.cxx @@ -114,15 +114,20 @@ HeaderBar::HeaderBar( vcl::Window* pParent, WinBits nWinStyle ) : HeaderBar::~HeaderBar() { - // Alle Items loeschen - for ( size_t i = 0, n = mpItemList->size(); i < n; ++i ) { - delete (*mpItemList)[ i ]; - } - mpItemList->clear(); - delete mpItemList; + disposeOnce(); } - +void HeaderBar::dispose() +{ + if (mpItemList) + { + for ( size_t i = 0, n = mpItemList->size(); i < n; ++i ) + delete (*mpItemList)[ i ]; + delete mpItemList; + mpItemList = NULL; + } + Window::dispose(); +} void HeaderBar::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) |