diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-22 12:53:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-23 09:02:58 +0200 |
commit | a8622c77d26ca7a635afc95bba9a5054dc31eb7c (patch) | |
tree | ecb1ce71272291515dec10fc5fe94061f7231b78 /stoc/source/security | |
parent | 2684aefcf5d2804351bda01a2d2fe7bbbd351451 (diff) |
loplugin:flatten in sdext..stoc
Change-Id: I460e813e20a691c53738373376d3363f553bbab2
Reviewed-on: https://gerrit.libreoffice.org/42636
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'stoc/source/security')
-rw-r--r-- | stoc/source/security/access_controller.cxx | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx index 65771de2bd99..06fdc0e4cfbf 100644 --- a/stoc/source/security/access_controller.cxx +++ b/stoc/source/security/access_controller.cxx @@ -439,19 +439,17 @@ Reference< security::XPolicy > const & AccessController::getPolicy() Reference< security::XPolicy > xPolicy; m_xComponentContext->getValueByName( "/singletons/com.sun.star.security.thePolicy" ) >>= xPolicy; - if (xPolicy.is()) - { - MutexGuard guard( m_mutex ); - if (! m_xPolicy.is()) - { - m_xPolicy = xPolicy; - } - } - else + if (!xPolicy.is()) { throw SecurityException( "cannot get policy singleton!", static_cast<OWeakObject *>(this) ); } + + MutexGuard guard( m_mutex ); + if (! m_xPolicy.is()) + { + m_xPolicy = xPolicy; + } } return m_xPolicy; } |