From d87d4028c1fe62489064d6d416ac7e1e35b7540a Mon Sep 17 00:00:00 2001 From: "Dr. Robert Marmorstein" Date: Mon, 7 Feb 2011 21:05:40 -0500 Subject: [PATCH] Fix kwin crash when using animated effects. BUG: 263383 --- effects/startupfeedback/startupfeedback.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/effects/startupfeedback/startupfeedback.cpp b/effects/startupfeedback/startupfeedback.cpp index 89f669e4d6..45f0f5cffb 100644 --- a/effects/startupfeedback/startupfeedback.cpp +++ b/effects/startupfeedback/startupfeedback.cpp @@ -146,11 +146,11 @@ void StartupFeedbackEffect::prePaintScreen( ScreenPrePaintData& data, int time ) { case BouncingFeedback: m_progress = (m_progress + time) % BOUNCE_DURATION; - m_frame = qRound( (qreal)m_progress / (qreal)BOUNCE_FRAME_DURATION ); + m_frame = qRound( (qreal)m_progress / (qreal)BOUNCE_FRAME_DURATION ) % BOUNCE_FRAMES; break; case BlinkingFeedback: m_progress = (m_progress + time) % BLINKING_DURATION; - m_frame = qRound( (qreal)m_progress / (qreal)BLINKING_FRAME_DURATION ); + m_frame = qRound( (qreal)m_progress / (qreal)BLINKING_FRAME_DURATION ) % BLINKING_FRAMES; break; default: break; // nothing