diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2018-11-29 21:53:48 +0100 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2018-12-01 18:29:43 +0100 |
commit | ac8dd8cfc41b5a3feac5ad7e7ed303ab66a13833 (patch) | |
tree | 633e34ff6ace9a0eb24549e771c0470ed126ffc7 /desktop | |
parent | 2d2969bbed3a766ad7e435af3365ff7c09dadc4b (diff) |
Add SolarMutexGuard where needed
When triggering rechecking of signature status, an assert fails and
brings down the program because we don't hold a SolarMutex. The
rechecking of signature status needs to broadcasts.
Change-Id: Ib500b06d2e191465df1e0da2097ddb1b6b06725a
Reviewed-on: https://gerrit.libreoffice.org/64292
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit d7a88b902af983145b196990949e89420e5bc4cf)
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index b8698d7b4396..178562574a30 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3807,6 +3807,8 @@ static bool doc_insertCertificate(LibreOfficeKitDocument* pThis, if (!xCertificate.is()) return false; + SolarMutexGuard aGuard; + return pObjectShell->SignDocumentContentUsingCertificate(xCertificate); } @@ -3884,6 +3886,8 @@ static int doc_getSignatureState(LibreOfficeKitDocument* pThis) if (!pObjectShell) return int(SignatureState::UNKNOWN); + SolarMutexGuard aGuard; + pObjectShell->RecheckSignature(false); return int(pObjectShell->GetDocumentSignatureState()); |