Backport (rev 919007): Only clear QLists when they are empty. Prevents crashes.

CCBUG: 182358

svn path=/branches/KDE/4.2/kdebase/workspace/; revision=919009
This commit is contained in:
Martin Gräßlin 2009-01-31 09:56:16 +00:00
parent 01f6af00c9
commit 7c1e1b758e

View file

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