desktop/source/lib/init.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit ddeec9754cb2871a709d22efb460e141ab4c6f33
Author:     Michael Meeks <michael.me...@collabora.com>
AuthorDate: Fri Apr 19 21:13:18 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sat Apr 20 11:56:09 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 <michael.me...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166319
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index fdf25b4cfeac..cc909fa57c16 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3405,6 +3405,8 @@ static int lo_joinThreads(LibreOfficeKit* /* pThis */)
 static void lo_setForkedChild(LibreOfficeKit* /* pThis */, bool bIsChild)
 {
     comphelper::LibreOfficeKit::setForkedChild(bIsChild);
+    if (bIsChild)
+        Application::UpdateMainThread();
 }
 
 static void lo_registerCallback (LibreOfficeKit* pThis,

Reply via email to