summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-04-23 15:10:53 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-04-23 20:08:56 +0200
commit0a04150b6eefb5feb7ecefaa5cd63dbac8c1574f (patch)
treebba1090934db2442396252fd997ecaf08e1dd72e
parentaafc733e8d8447f1ba878faa6e7ed3804ed44007 (diff)
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@redhat.com>
-rw-r--r--ucb/source/ucp/gio/gio_content.cxx11
1 files changed, 9 insertions, 2 deletions
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;
}