summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-02-17 19:49:27 +0000
committerMichael Meeks <michael.meeks@collabora.com>2015-04-09 22:22:10 +0100
commitef5ee3247467a2bae5ae12f758a75758f58afaa4 (patch)
tree63b9f622da893cdf732e1f1d021b44a973bfdb6c /svtools
parent8b9b9985b04b8f3b602890806ea905f8c7cb45ba (diff)
vcl: more double-dispose protection, and survival after dispose.
Change-Id: I271f9bcb85d07a28abef2d97ef3c31287878324d
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/ctrlbox.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 2bac5a8a3567..80e22ae558e1 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -123,8 +123,12 @@ ColorListBox::~ColorListBox()
void ColorListBox::dispose()
{
- ImplDestroyColorEntries();
- delete pColorList;
+ if ( pColorList )
+ {
+ ImplDestroyColorEntries();
+ delete pColorList;
+ pColorList = NULL;
+ }
ListBox::dispose();
}
@@ -953,8 +957,11 @@ FontNameBox::~FontNameBox()
void FontNameBox::dispose()
{
- SaveMRUEntries (maFontMRUEntriesFile);
- ImplDestroyFontList();
+ if (mpFontList)
+ {
+ SaveMRUEntries (maFontMRUEntriesFile);
+ ImplDestroyFontList();
+ }
ComboBox::dispose();
}
@@ -1017,6 +1024,7 @@ void FontNameBox::InitFontMRUEntriesFile()
void FontNameBox::ImplDestroyFontList()
{
delete mpFontList;
+ mpFontList = NULL;
}
void FontNameBox::Fill( const FontList* pList )