[Libreoffice-commits] core.git: vcl/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Wed May 19 12:44:58 UTC 2021
vcl/source/app/svapp.cxx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 33972c49d59b3dd7bb8c361e1099cf457194ce93
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed May 19 13:19:36 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed May 19 14:44:14 2021 +0200
Revert "fix leak when LOK not active"
This reverts commit fd6bdd1a3ec7925b7208a0341248e09b02800795.
I was mistaken, the caller is responsible for freeing the memory
of the payload.
Change-Id: I0f140640cfa03a3ef626704ae60783f46a661186
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115798
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 0e74c7b8ee7e..ecfaa3805bef 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -322,13 +322,13 @@ void Application::notifyWindow(vcl::LOKWindowId /*nLOKWindowId*/,
void Application::libreOfficeKitViewCallback(int nType, const char* pPayload) const
{
- if (!comphelper::LibreOfficeKit::isActive() || !m_pCallback)
- {
- free(static_cast<void*>(const_cast<char*>(pPayload)));
+ if (!comphelper::LibreOfficeKit::isActive())
return;
- }
- m_pCallback(nType, pPayload, m_pCallbackData);
+ if (m_pCallback)
+ {
+ m_pCallback(nType, pPayload, m_pCallbackData);
+ }
}
More information about the Libreoffice-commits
mailing list