Only clear QLists when they are empty. Prevents crashes.

BUG: 182358

svn path=/trunk/KDE/kdebase/workspace/; revision=919007
icc-effect-5.14.5
Martin Gräßlin 2009-01-31 09:49:33 +00:00
parent e93f4306d9
commit a6fb2688cd
1 changed files with 4 additions and 2 deletions

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;