diff --git a/effects/coverswitch.cpp b/effects/coverswitch.cpp index b7369a1990..9bba048590 100644 --- a/effects/coverswitch.cpp +++ b/effects/coverswitch.cpp @@ -201,8 +201,10 @@ void CoverSwitchEffect::paintScreen( int mask, QRegion region, ScreenPaintData& rightIndex = 0; EffectWindow* frontWindow = tempList[ index ]; - leftWindows.clear(); - rightWindows.clear(); + if( !leftWindows.isEmpty() ) + leftWindows.clear(); + if( !rightWindows.isEmpty() ) + rightWindows.clear(); bool evenWindows = ( tempList.count() % 2 == 0 ) ? true : false; int leftWindowCount = 0;