From 8503b6c2a1d87913a1c32cc25782b1500152635a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sun, 27 Nov 2011 18:36:59 +0100 Subject: [PATCH] initialize m_currentBuildQuadsIterator to avoid crashes if buildQuads is called before the first startPaint, but eg. from a propertyNotify event for a shadow --- effects.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/effects.cpp b/effects.cpp index 000e35c911..e388b33e4a 100644 --- a/effects.cpp +++ b/effects.cpp @@ -99,6 +99,9 @@ EffectsHandlerImpl::EffectsHandlerImpl(CompositingType type) , next_window_quad_type(EFFECT_QUAD_TYPE_START) , mouse_poll_ref_count(0) { + // init is important, otherwise causes crashes when quads are build before the first painting pass start + m_currentBuildQuadsIterator = m_activeEffects.end(); + Workspace *ws = Workspace::self(); connect(ws, SIGNAL(currentDesktopChanged(int)), this, SLOT(slotDesktopChanged(int))); connect(ws, SIGNAL(clientAdded(KWin::Client*)), this, SLOT(slotClientAdded(KWin::Client*)));