summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/control/combobox.cxx6
-rw-r--r--vcl/source/control/ilstbox.cxx7
2 files changed, 8 insertions, 5 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 441b3b5d65ee..2c785078841b 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -74,7 +74,11 @@ ComboBox::~ComboBox()
void ComboBox::dispose()
{
mpSubEdit.disposeAndClear();
- mpImplLB.disposeAndClear();
+
+ VclPtr< ImplListBox > pImplLB = mpImplLB;
+ mpImplLB.clear();
+ pImplLB.disposeAndClear();
+
mpFloatWin.disposeAndClear();
mpBtn.disposeAndClear();
Edit::dispose();
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index e05746e1bab6..dc09182ffd5c 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -2174,10 +2174,9 @@ ImplListBox::~ImplListBox()
void ImplListBox::dispose()
{
- mpHScrollBar.clear();
- mpVScrollBar.clear();
- mpScrollBarBox.clear();
- maLBWindow.clear();
+ mpHScrollBar.disposeAndClear();
+ mpVScrollBar.disposeAndClear();
+ mpScrollBarBox.disposeAndClear();
maLBWindow.disposeAndClear();
Control::dispose();
}