From 38d760c960017b27d24799919ef38141c3b8e9a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 27 Sep 2011 17:42:20 +0200 Subject: [PATCH] Only push shader when Cube effect is active This caused situations in which the shader was pushed but never popped from the stack as for the latter case there was a check whether the effect is active. BUG: 280455 --- effects/cube/cube.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/effects/cube/cube.cpp b/effects/cube/cube.cpp index f48f0f731a..9b957c29c4 100644 --- a/effects/cube/cube.cpp +++ b/effects/cube/cube.cpp @@ -1292,9 +1292,10 @@ void CubeEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int t void CubeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data) { ShaderManager *shaderManager = ShaderManager::instance(); - GLShader *shader = shaderManager->pushShader(ShaderManager::GenericShader); + GLShader *shader = NULL; QMatrix4x4 origMatrix; if (activated && cube_painting) { + shader = shaderManager->pushShader(ShaderManager::GenericShader); //kDebug(1212) << w->caption(); float opacity = cubeOpacity; if (start) {