sw/source/ui/dbui/createaddresslistdialog.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit a9291f02c6eb9aa97a287dd5a99ad4b4d9448572
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Oct 2 16:21:02 2020 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Tue Oct 6 12:41:02 2020 +0200

    tdf#137209 unparent widgets in fragment dtor
    
    Change-Id: I819514fd2b97e2cc8daad71a7f3b0b27afe6136d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103795
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx 
b/sw/source/ui/dbui/createaddresslistdialog.cxx
index d7c9ca8c9b6d..4f0a49acd88c 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -47,11 +47,13 @@ struct SwAddressFragment
     std::unique_ptr<weld::Builder> m_xBuilder;
     std::unique_ptr<weld::Label> m_xLabel;
     std::unique_ptr<weld::Entry> m_xEntry;
+    weld::Container* m_pGrid;
 
     SwAddressFragment(weld::Container* pGrid, int nLine)
         : m_xBuilder(Application::CreateBuilder(pGrid, 
"modules/swriter/ui/addressfragment.ui"))
         , m_xLabel(m_xBuilder->weld_label("label"))
         , m_xEntry(m_xBuilder->weld_entry("entry"))
+        , m_pGrid(pGrid)
     {
         m_xLabel->set_grid_left_attach(0);
         m_xLabel->set_grid_top_attach(nLine);
@@ -59,6 +61,12 @@ struct SwAddressFragment
         m_xEntry->set_grid_left_attach(1);
         m_xEntry->set_grid_top_attach(nLine);
     }
+
+    virtual ~SwAddressFragment()
+    {
+        m_pGrid->move(m_xEntry.get(), nullptr);
+        m_pGrid->move(m_xLabel.get(), nullptr);
+    }
 };
 
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to