diff options
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(); } |