From f2069112c2b34af4dccdf6e977f7f482fe2725bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 3 May 2012 10:34:09 +0200 Subject: [PATCH] Fix crash on closing present windows due to filter frame being null Crash got introduced with bbf561ef9726e574684b67d53fc3c56cfc4e2e89 Also fixing coding style issue introduced in same commit. --- effects/presentwindows/presentwindows.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/effects/presentwindows/presentwindows.cpp b/effects/presentwindows/presentwindows.cpp index ab2fc90257..81c058dd47 100755 --- a/effects/presentwindows/presentwindows.cpp +++ b/effects/presentwindows/presentwindows.cpp @@ -1603,7 +1603,9 @@ void PresentWindowsEffect::setActive(bool active, bool closingTab) // Move all windows back to their original position foreach (EffectWindow * w, m_motionManager.managedWindows()) m_motionManager.moveWindow(w, w->geometry()); - m_filterFrame->free(); + if (m_filterFrame) { + m_filterFrame->free(); + } m_windowFilter.clear(); m_selectedWindows.clear(); @@ -1630,7 +1632,7 @@ void PresentWindowsEffect::setActive(bool active, bool closingTab) void PresentWindowsEffect::updateFilterFrame() { QRect area = effects->clientArea(ScreenArea, effects->activeScreen(), effects->currentDesktop()); - if (!m_filterFrame){ + if (!m_filterFrame) { m_filterFrame = effects->effectFrame(EffectFrameStyled, false); QFont font; font.setPointSize(font.pointSize() * 2);