include/svx/galleryobjectcollection.hxx | 1 + svx/source/gallery2/galleryobjectcollection.cxx | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-)
New commits: commit 70094be161b64d1c5f837054508a6b8ad59ed337 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Sep 8 10:29:49 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Sep 8 12:59:36 2020 +0200 cid#1466647 Resource leak and cid#1466652 Resource leak cid#1466655 Resource leak cid#1466662 Resource leak Change-Id: I0f1bc254519dd79442493890dfdff3c1f9ce87d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102229 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/svx/galleryobjectcollection.hxx b/include/svx/galleryobjectcollection.hxx index 8e322549b5eb..a1373a44897a 100644 --- a/include/svx/galleryobjectcollection.hxx +++ b/include/svx/galleryobjectcollection.hxx @@ -49,6 +49,7 @@ class SVXCORE_DLLPUBLIC GalleryObjectCollection { private: std::vector<std::unique_ptr<GalleryObject>> m_aObjectList; + INetURLObject m_aInvalidURL; public: GalleryObjectCollection(); diff --git a/svx/source/gallery2/galleryobjectcollection.cxx b/svx/source/gallery2/galleryobjectcollection.cxx index c5667eea2dca..4082852ce371 100644 --- a/svx/source/gallery2/galleryobjectcollection.cxx +++ b/svx/source/gallery2/galleryobjectcollection.cxx @@ -53,8 +53,7 @@ const INetURLObject& GalleryObjectCollection::getURLForPosition(sal_uInt32 nPos) { if (nPos < size()) return get(nPos)->getURL(); - INetURLObject* aInvalidURL = new INetURLObject(); - return *aInvalidURL; + return m_aInvalidURL; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits