summaryrefslogtreecommitdiff
path: root/vcl/source/opengl/OpenGLHelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/opengl/OpenGLHelper.cxx')
-rw-r--r--vcl/source/opengl/OpenGLHelper.cxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index 6aeb53af17a4..64a470fe5f63 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -845,22 +845,22 @@ void OpenGLZone::hardDisable()
{
// protect ourselves from double calling etc.
static bool bDisabled = false;
- if (!bDisabled)
- {
- bDisabled = true;
-
- // Disable the OpenGL support
- std::shared_ptr<comphelper::ConfigurationChanges> xChanges(
- comphelper::ConfigurationChanges::create());
- officecfg::Office::Common::VCL::UseOpenGL::set(false, xChanges);
- xChanges->commit();
-
- // Force synchronous config write
- css::uno::Reference< css::util::XFlushable >(
- css::configuration::theDefaultProvider::get(
- comphelper::getProcessComponentContext()),
- css::uno::UNO_QUERY_THROW)->flush();
- }
+ if (bDisabled)
+ return;
+
+ bDisabled = true;
+
+ // Disable the OpenGL support
+ std::shared_ptr<comphelper::ConfigurationChanges> xChanges(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::VCL::UseOpenGL::set(false, xChanges);
+ xChanges->commit();
+
+ // Force synchronous config write
+ css::uno::Reference< css::util::XFlushable >(
+ css::configuration::theDefaultProvider::get(
+ comphelper::getProcessComponentContext()),
+ css::uno::UNO_QUERY_THROW)->flush();
}
void OpenGLZone::relaxWatchdogTimings()