From c221426b5e62d5f63d8b706237051fec5db1285b Mon Sep 17 00:00:00 2001 From: Lucas Murray Date: Mon, 19 Oct 2009 05:04:35 +0000 Subject: [PATCH] Don't access a variable that may not exist. svn path=/trunk/KDE/kdebase/workspace/; revision=1037434 --- effects/slidingpopups/slidingpopups.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/effects/slidingpopups/slidingpopups.cpp b/effects/slidingpopups/slidingpopups.cpp index c2941029c4..864fd930c8 100644 --- a/effects/slidingpopups/slidingpopups.cpp +++ b/effects/slidingpopups/slidingpopups.cpp @@ -93,7 +93,16 @@ void SlidingPopupsEffect::paintWindow( EffectWindow* w, int mask, QRegion region if( animating ) { - const qreal progress = appearing?(1 - mAppearingWindows[ w ].value()):mDisappearingWindows[ w ].value(); + qreal progress; + if( appearing ) + progress = 1.0 - mAppearingWindows[ w ].value(); + else + { + if( mDisappearingWindows.contains( w )) + progress = mDisappearingWindows[ w ].value(); + else + progress = 1.0; + } const int start = mWindowsData[ w ].start; switch (mWindowsData[ w ].from)