[Libreoffice-commits] core.git: sfx2/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Fri May 21 11:45:39 UTC 2021
sfx2/source/view/viewsh.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 0820a4c7ac12e6fc2cc683f8a07c99a11d40e30e
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri May 21 12:30:33 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri May 21 13:45:00 2021 +0200
fix leak in some tests
this situation only really happens during shutdown, when some of the app
events are dropped
Change-Id: If327daf1be243a603669f624b49917a73ddfd0fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115909
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index b10b17853914..ee5bcccec5be 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -202,7 +202,8 @@ void SAL_CALL SfxClipboardChangeListener::disposing( const lang::EventObject& /*
// root for many deadlocks, especially in conjunction with the "Windows"
// based single thread apartment clipboard code!
AsyncExecuteInfo* pInfo = new AsyncExecuteInfo( ASYNCEXECUTE_CMD_DISPOSING, this );
- Application::PostUserEvent( LINK( nullptr, SfxClipboardChangeListener, AsyncExecuteHdl_Impl ), pInfo );
+ if (!Application::PostUserEvent( LINK( nullptr, SfxClipboardChangeListener, AsyncExecuteHdl_Impl ), pInfo ))
+ delete pInfo;
}
void SAL_CALL SfxClipboardChangeListener::changedContents( const datatransfer::clipboard::ClipboardEvent& )
@@ -211,7 +212,8 @@ void SAL_CALL SfxClipboardChangeListener::changedContents( const datatransfer::c
// root for many deadlocks, especially in conjunction with the "Windows"
// based single thread apartment clipboard code!
AsyncExecuteInfo* pInfo = new AsyncExecuteInfo( ASYNCEXECUTE_CMD_CHANGEDCONTENTS, this );
- Application::PostUserEvent( LINK( nullptr, SfxClipboardChangeListener, AsyncExecuteHdl_Impl ), pInfo );
+ if (!Application::PostUserEvent( LINK( nullptr, SfxClipboardChangeListener, AsyncExecuteHdl_Impl ), pInfo ))
+ delete pInfo;
}
sal_uInt32 SfxViewShell_Impl::m_nLastViewShellId = 0;
More information about the Libreoffice-commits
mailing list