diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-03-02 22:02:19 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-09 22:35:14 +0100 |
commit | 954e5e4b7820c5db3a6720dc9dc27e49cee449ac (patch) | |
tree | a5136c84a45d3861f7271b9eced37e33aa274658 /cui/source/dialogs/iconcdlg.cxx | |
parent | e8284454f517d29a29f95a347a38730ded047f41 (diff) |
prophylactic double dispose audit.
Change-Id: Ia18c0b7a76fb0894efe33afaf69a0079c4583228
Diffstat (limited to 'cui/source/dialogs/iconcdlg.cxx')
-rw-r--r-- | cui/source/dialogs/iconcdlg.cxx | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx index 111499ef5c5c..0a1c70e7d70b 100644 --- a/cui/source/dialogs/iconcdlg.cxx +++ b/cui/source/dialogs/iconcdlg.cxx @@ -236,18 +236,24 @@ void IconChoiceDialog::dispose() } delete pData; } + maPageList.clear(); - // remove Userdata from Icons - for ( sal_uLong i=0; i < m_pIconCtrl->GetEntryCount(); i++) + if (m_pIconCtrl) { - SvxIconChoiceCtrlEntry* pEntry = m_pIconCtrl->GetEntry ( i ); - sal_uInt16* pUserData = static_cast<sal_uInt16*>(pEntry->GetUserData()); - delete pUserData; + // remove Userdata from Icons + for ( sal_uLong i=0; i < m_pIconCtrl->GetEntryCount(); i++) + { + SvxIconChoiceCtrlEntry* pEntry = m_pIconCtrl->GetEntry ( i ); + delete static_cast<sal_uInt16*>(pEntry->GetUserData()); + } + m_pIconCtrl = NULL; } - delete pRanges; + pRanges = NULL; delete pOutSet; + pOutSet = NULL; + ModalDialog::dispose(); } |