From 9d7db7316ab2f3d1a6e578625d743e6004292fb4 Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Mon, 5 Nov 2018 16:59:20 +0100 Subject: update main thread "properly" in headless case Change-Id: Ie76555a007db13e89f06c85d02beebf84eadea0b Reviewed-on: https://gerrit.libreoffice.org/62912 Reviewed-by: Michael Meeks Tested-by: Michael Meeks (cherry picked from commit 3fb90f6eab998d0fda07bd3f4a2ebf650e6b6a61) Reviewed-on: https://gerrit.libreoffice.org/63062 Tested-by: Jenkins Reviewed-by: Andras Timar --- vcl/headless/svpinst.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vcl/headless/svpinst.cxx') diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx index 25e15ca9961a..b7df88e2ce98 100644 --- a/vcl/headless/svpinst.cxx +++ b/vcl/headless/svpinst.cxx @@ -398,7 +398,10 @@ bool SvpSalInstance::IsMainThread() const void SvpSalInstance::updateMainThread() { if (!IsMainThread()) + { m_MainThread = osl::Thread::getCurrentIdentifier(); + ImplGetSVData()->mnMainThreadId = osl::Thread::getCurrentIdentifier(); + } } bool SvpSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) -- cgit