From b3abe7526b7c664f38234949c8382f619c495a38 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Wed, 26 Jan 2022 22:19:31 +0000 Subject: [PATCH] Fix OpenGLSafePoint guard qScopeGuard runs the method when the function goes out of scope. Without a local variable this is immediately. --- src/composite.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/composite.cpp b/src/composite.cpp index 048f6ecebe..46e6af50e5 100644 --- a/src/composite.cpp +++ b/src/composite.cpp @@ -167,7 +167,7 @@ bool Compositor::attemptOpenGLCompositing() } kwinApp()->platform()->createOpenGLSafePoint(Platform::OpenGLSafePoint::PreInit); - qScopeGuard([]() { + auto safePointScope = qScopeGuard([]() { kwinApp()->platform()->createOpenGLSafePoint(Platform::OpenGLSafePoint::PostInit); });