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 /extensions/source/bibliography/bibcont.cxx | |
parent | 7aa921cb53eedd0a107fbe9f75365adcce4d37d9 (diff) |
vclwidget: check for calling delete on subclasses of vcl::Window
Change-Id: I7fb7cf919e3f46dd03a18b1cb95fa881915f9642
Diffstat (limited to 'extensions/source/bibliography/bibcont.cxx')
-rw-r--r-- | extensions/source/bibliography/bibcont.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/extensions/source/bibliography/bibcont.cxx b/extensions/source/bibliography/bibcont.cxx index 31547c0131c7..3699f31c68b5 100644 --- a/extensions/source/bibliography/bibcont.cxx +++ b/extensions/source/bibliography/bibcont.cxx @@ -93,9 +93,9 @@ void BibWindowContainer::dispose() { if( pChild ) { - vcl::Window* pDel = GetChild(); + VclPtr<vcl::Window> pDel = GetChild(); pChild = NULL; // prevents GetFocus for child while deleting! - delete pDel; + pDel.disposeAndClear(); } vcl::Window::dispose(); } @@ -142,16 +142,16 @@ void BibBookContainer::dispose() if( pTopWin ) { - vcl::Window* pDel = pTopWin; + VclPtr<vcl::Window> pDel = pTopWin; pTopWin = NULL; // prevents GetFocus for child while deleting! - delete pDel; + pDel.disposeAndClear(); } if( pBottomWin ) { - vcl::Window* pDel = pBottomWin; + VclPtr<vcl::Window> pDel = pBottomWin; pBottomWin = NULL; // prevents GetFocus for child while deleting! - delete pDel; + pDel.disposeAndClear(); } CloseBibModul( pBibMod ); |