desktop/source/lib/init.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit e4176371a0aa9c2364a9f6cffaaaaf82711c1b72
Author: Michael Meeks <[email protected]>
AuthorDate: Fri Apr 19 21:13:18 2024 +0100
Commit: Caolán McNamara <[email protected]>
CommitDate: Tue Aug 27 11:33:17 2024 +0200
lok: ensure our 'main thread' concept is updated post-fork.
Otherwise we fall foul of assertions and behavioral differences
around the main thread as the new forked main-thread has a
different thread-id.
Change-Id: I0bd97e5173767ac6c697326aaf0d0822037e480f
Signed-off-by: Michael Meeks <[email protected]>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166319
Tested-by: Jenkins CollaboraOffice <[email protected]>
Reviewed-by: Caolán McNamara <[email protected]>
(cherry picked from commit ddeec9754cb2871a709d22efb460e141ab4c6f33)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172453
Tested-by: Jenkins
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 1a9fc79e621d..d7b7f9f3d429 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3491,6 +3491,8 @@ static void lo_startThreads(LibreOfficeKit* /* pThis */)
static void lo_setForkedChild(LibreOfficeKit* /* pThis */, bool bIsChild)
{
comphelper::LibreOfficeKit::setForkedChild(bIsChild);
+ if (bIsChild)
+ Application::UpdateMainThread();
}
static void lo_registerCallback (LibreOfficeKit* pThis,