[Libreoffice-commits] core.git: dtrans/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Feb 5 13:11:00 UTC 2019
dtrans/source/win32/clipb/MtaOleClipb.cxx | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit ab99c08defad5431bbd0b456e3854d749ec0173e
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Tue Feb 5 14:21:22 2019 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Tue Feb 5 14:10:35 2019 +0100
Cleanup event properly; handle error from MsgWaitForMultipleObjects
Commit 11a2809e369b2a6fcbb2d7f0db131a945557c6e2 follow-up
Change-Id: Id70a95f46655ade3b867e0377ddd5bee13993187
Reviewed-on: https://gerrit.libreoffice.org/67402
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/dtrans/source/win32/clipb/MtaOleClipb.cxx b/dtrans/source/win32/clipb/MtaOleClipb.cxx
index ac3dc68083e1..2c579e38e741 100644
--- a/dtrans/source/win32/clipb/MtaOleClipb.cxx
+++ b/dtrans/source/win32/clipb/MtaOleClipb.cxx
@@ -108,6 +108,9 @@ namespace /* private */
break;
}
+
+ default: // WAIT_FAILED?
+ return false;
}
}
}
@@ -268,6 +271,10 @@ CMtaOleClipboard::~CMtaOleClipboard( )
m_bRunClipboardNotifierThread = false;
SetEvent( m_hTerminateClipboardChangedNotifierEvent );
+ // unblock whoever could still wait for event processing
+ if (m_hEvtWndDisposed)
+ SetEvent(m_hEvtWndDisposed);
+
sal_uInt32 dwResult = WaitForSingleObject(
m_hClipboardChangedNotifierThread, MAX_WAIT_SHUTDOWN );
@@ -297,6 +304,9 @@ CMtaOleClipboard::~CMtaOleClipboard( )
if ( nullptr != m_hEvtThrdReady )
CloseHandle( m_hEvtThrdReady );
+ if (m_hEvtWndDisposed)
+ CloseHandle(m_hEvtWndDisposed);
+
if ( m_MtaOleReqWndClassAtom )
UnregisterClassW( g_szWndClsName, nullptr );
More information about the Libreoffice-commits
mailing list