[Libreoffice-commits] core.git: extensions/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jun 8 09:45:20 UTC 2020
extensions/source/update/check/updatecheck.cxx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 64814781193cbfcb3535ae4061cbdf2be0ba02e3
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sun Jun 7 13:42:17 2020 +0200
Commit: Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Mon Jun 8 11:44:32 2020 +0200
Use o3tl::safeCoInitializeEx/safeCoUninitializeReinit (extensions/updatecheck)
Change-Id: I009664b9c8f1c302d5a90e7014f612dcd3602f63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95664
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index 1f8faabadfd7..b4a5152a563e 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -41,6 +41,7 @@
#include <tools/diagnose_ex.h>
#ifdef _WIN32
+#include <o3tl/safeCoInitUninit.hxx>
#include <objbase.h>
#endif
@@ -588,8 +589,9 @@ DownloadThread::run()
osl_setThreadName("DownloadThread");
#ifdef _WIN32
- CoUninitialize();
- CoInitializeEx( nullptr, COINIT_APARTMENTTHREADED );
+ int nNbCallCoInitializeExForReinit = 0;
+ // for SystemShellExecute
+ o3tl::safeCoInitializeEx(COINIT_APARTMENTTHREADED, nNbCallCoInitializeExForReinit);
#endif
while( schedule() )
@@ -627,6 +629,9 @@ DownloadThread::run()
n=0;
}
}
+#ifdef _WIN32
+ o3tl::safeCoUninitializeReinit(COINIT_MULTITHREADED, nNbCallCoInitializeExForReinit);
+#endif
}
More information about the Libreoffice-commits
mailing list