sfx2/source/view/lokhelper.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 5ed6aae8b572fd2b7623454acbb1de791f166c45 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue May 11 09:45:13 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue May 11 12:51:19 2021 +0200 fix leak in LOKPostAsyncEvent Change-Id: I0bae5c59d75b315c1c086640a8a9bb638a82923d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115381 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 0487ff96922e..389c45392b46 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -612,9 +612,11 @@ namespace void LOKPostAsyncEvent(void* pEv, void*) { - LOKAsyncEventData* pLOKEv = static_cast<LOKAsyncEventData*>(pEv); + std::unique_ptr<LOKAsyncEventData> pLOKEv(static_cast<LOKAsyncEventData*>(pEv)); if (pLOKEv->mpWindow->IsDisposed()) + { return; + } int nView = SfxLokHelper::getView(nullptr); if (nView != pLOKEv->mnView) @@ -676,8 +678,6 @@ namespace assert(false); break; } - - delete pLOKEv; } void postEventAsync(LOKAsyncEventData *pEvent) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits