[Libreoffice-commits] core.git: ucb/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Tue Apr 23 18:09:48 UTC 2019


 ucb/source/ucp/gio/gio_content.cxx |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 0a04150b6eefb5feb7ecefaa5cd63dbac8c1574f
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Apr 23 15:10:53 2019 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Apr 23 20:08:56 2019 +0200

    tdf#124635 MountOperation::Mount can be called with SolarMutex unlocked
    
    Change-Id: I7a36dd235a100b0d283eec86646dc167ac224ba7
    Reviewed-on: https://gerrit.libreoffice.org/71133
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx
index b1b51551ef15..d3a910c02c4a 100644
--- a/ucb/source/ucp/gio/gio_content.cxx
+++ b/ucb/source/ucp/gio/gio_content.cxx
@@ -349,8 +349,15 @@ GError *MountOperation::Mount(GFile *pFile)
         // GdkThreadsLeave unlock the SolarMutex down to zero at the end of
         // g_main_loop_run, so we need ~SolarMutexReleaser to raise it back to
         // the original value again:
-        SolarMutexReleaser rel;
-        g_main_loop_run(mpLoop);
+        if (comphelper::SolarMutex::get()->IsCurrentThread())
+        {
+            SolarMutexReleaser rel;
+            g_main_loop_run(mpLoop);
+        }
+        else
+        {
+            g_main_loop_run(mpLoop);
+        }
     }
     return mpError;
 }


More information about the Libreoffice-commits mailing list