Kaydet (Commit) d21212ca authored tarafından Jan-Marek Glogowski's avatar Jan-Marek Glogowski Kaydeden (comit) Tor Lillqvist

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/42802Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTor Lillqvist <tml@collabora.com>
Tested-by: 's avatarTor Lillqvist <tml@collabora.com>
üst 48db7180
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment