summaryrefslogtreecommitdiff
path: root/vcl/source/window/layout.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/layout.cxx')
-rw-r--r--vcl/source/window/layout.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 2c6cabff51e7..a3761389b208 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -2043,8 +2043,8 @@ MessageDialog::MessageDialog(vcl::Window* pParent, const OString& rID, const OUS
void MessageDialog::dispose()
{
- for (size_t i = 0; i < m_aOwnedButtons.size(); ++i)
- m_aOwnedButtons[i].disposeAndClear();
+ for (VclPtr<PushButton> & pOwnedButton : m_aOwnedButtons)
+ pOwnedButton.disposeAndClear();
m_aOwnedButtons.clear();
m_pPrimaryMessage.disposeAndClear();