[Libreoffice-commits] core.git: sfx2/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Tue May 11 15:29:27 UTC 2021
sfx2/source/notify/hintpost.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit da6c8343993c4d5c0e7b60eebe27a611def7f250
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue May 11 15:03:11 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue May 11 17:28:43 2021 +0200
don't leak when the SfxHintPoster is disabled
Change-Id: Ia445feb93b7e65e1b64c69efded9a3e779cb578e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115405
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sfx2/source/notify/hintpost.cxx b/sfx2/source/notify/hintpost.cxx
index 0020d3beac69..446c7a954ba9 100644
--- a/sfx2/source/notify/hintpost.cxx
+++ b/sfx2/source/notify/hintpost.cxx
@@ -37,8 +37,11 @@ void SfxHintPoster::Post(std::unique_ptr<SfxRequest> pHintToPost)
IMPL_LINK(SfxHintPoster, DoEvent_Impl, void*, pPostedHint, void)
{
+ auto pRequest = static_cast<SfxRequest*>(pPostedHint);
if (m_Link)
- m_Link(std::unique_ptr<SfxRequest>(static_cast<SfxRequest*>(pPostedHint)));
+ m_Link(std::unique_ptr<SfxRequest>(pRequest));
+ else
+ delete pRequest;
ReleaseRef();
}
More information about the Libreoffice-commits
mailing list