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.
This commit is contained in:
Martin Gräßlin 2012-05-03 10:34:09 +02:00
parent d05d55b140
commit f2069112c2

View file

@ -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);