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>
This commit is contained in:
Stephan Bergmann
2019-04-23 15:10:53 +02:00
parent aafc733e8d
commit 0a04150b6e

View File

@@ -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;
}