summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2017-09-26 12:22:16 +0200
committerTor Lillqvist <tml@collabora.com>2017-09-27 06:53:32 +0200
commitd21212cadebad682e7e3cce2b93b7d9a6ee1e1ec (patch)
tree39c2e2339f3a02c22bd523c949611de3ffe21437
parent48db718042d32bffe95ec058d636ed935d98ec4d (diff)
tdf#112646 Flush the clipboard holding SolarMutex
It seems Desktop::terminate can be called with or without the SolarMutex. So make sure we actually hold the mutex to release it correctly when flushing the clipboard on termination. Change-Id: Ie42daf5dba0f4208318a8c1fe463cd3a80dd9141 Reviewed-on: https://gerrit.libreoffice.org/42802 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
-rw-r--r--framework/source/services/desktop.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index 2f3ffe8c2a56..c892c6eb7a9a 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -322,11 +322,12 @@ sal_Bool SAL_CALL Desktop::terminate()
// The clipboard listener needs to be the first. It can create copies of the
// existing document which needs basically all the available infrastructure.
- impl_sendTerminateToClipboard();
-
- impl_sendNotifyTerminationEvent();
{
- SolarMutexGuard aGuard;
+ SolarMutexResettableGuard aGuard;
+ impl_sendTerminateToClipboard();
+ aGuard.clear();
+ impl_sendNotifyTerminationEvent();
+ aGuard.reset();
Scheduler::ProcessEventsToIdle();
}