diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-18 08:33:14 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-10 11:59:25 +0100 |
commit | 0556598b35eb6d81fdaff04520f14202660f0333 (patch) | |
tree | 2fb64309bbd8e519f25b1e55824bad5513754e91 /dbaccess/source/ui/relationdesign | |
parent | 7aa921cb53eedd0a107fbe9f75365adcce4d37d9 (diff) |
vclwidget: check for calling delete on subclasses of vcl::Window
Change-Id: I7fb7cf919e3f46dd03a18b1cb95fa881915f9642
Diffstat (limited to 'dbaccess/source/ui/relationdesign')
-rw-r--r-- | dbaccess/source/ui/relationdesign/RelationTableView.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx index 75b0c7919147..615a760349de 100644 --- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx +++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx @@ -106,14 +106,14 @@ void ORelationTableView::ReSync() for(;aIter != rTabWinDataList.rend();++aIter) { TTableWindowData::value_type pData = *aIter; - OTableWindow* pTabWin = createWindow(pData); + VclPtr<OTableWindow> pTabWin = createWindow(pData); if (!pTabWin->Init()) { // initialisation failed, which means this TabWin is not available, therefore, // it should be cleaned up, including its data in the document pTabWin->clearListBox(); - delete pTabWin; + pTabWin.disposeAndClear(); arrInvalidTables.push_back(pData->GetTableName()); rTabWinDataList.erase( ::std::remove(rTabWinDataList.begin(), rTabWinDataList.end(), *aIter), rTabWinDataList.end()); @@ -300,7 +300,7 @@ void ORelationTableView::AddTabWin(const OUString& _rComposedName, const OUStrin pNewTabWinData->ShowAll(false); // link new window into the window list - OTableWindow* pNewTabWin = createWindow( pNewTabWinData ); + VclPtr<OTableWindow> pNewTabWin = createWindow( pNewTabWinData ); if(pNewTabWin->Init()) { m_pView->getController().getTableWindowData().push_back( pNewTabWinData); @@ -320,7 +320,7 @@ void ORelationTableView::AddTabWin(const OUString& _rComposedName, const OUStrin else { pNewTabWin->clearListBox(); - delete pNewTabWin; + pNewTabWin.disposeAndClear(); } } |