diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-14 15:13:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-15 14:34:41 +0200 |
commit | 8629850eb98ec7f3501f0904063958d61b370747 (patch) | |
tree | 11644d5006d28338948250cb1adaa0f5493f6ee5 /sw/source/ui/misc | |
parent | 4e59ef9864cc659e7f5560648ed800c3575f805a (diff) |
loplugin:useuniqueptr pass SwTextBlocks around by unique_ptr
fix leaks in SwGlossaryHdl::NewGlossary and SwGlossaryHdl::DelGlossary
and SwGlossaryHdl::InsertGlossary error paths
Change-Id: Iaf98fea08cd44bf68885e053854cf65372fcfc2c
Reviewed-on: https://gerrit.libreoffice.org/60495
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/ui/misc')
-rw-r--r-- | sw/source/ui/misc/glossary.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 5e7cee384d25..58ec33857f9c 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -771,8 +771,8 @@ IMPL_LINK_NOARG(SwGlossaryDlg, EditHdl, MenuButton *, void) // EndDialog must not be called in MenuHdl if (m_pEditBtn->GetCurItemIdent() == "edit") { - SwTextBlocks *pGroup = ::GetGlossaries()->GetGroupDoc ( GetCurrGrpName () ); - delete pGroup; + std::unique_ptr<SwTextBlocks> pGroup = ::GetGlossaries()->GetGroupDoc ( GetCurrGrpName () ); + pGroup.reset(); EndDialog(RET_EDIT); } } |