From e59c8c7241162a8ad4d710e542be39279fb0c576 Mon Sep 17 00:00:00 2001 From: Andre Duffeck Date: Tue, 13 Nov 2007 06:29:46 +0000 Subject: [PATCH] At least set an interval of 1 or it sometimes crashes with division by zero svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=735966 --- phase.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/phase.cpp b/phase.cpp index 229c451ff..6dd34d1b1 100644 --- a/phase.cpp +++ b/phase.cpp @@ -317,6 +317,7 @@ Phase::AnimId Phase::customAnimation(int frames, int duration, Phase::CurveShape state->currentFrame = 0; state->curve = curve; state->interval = duration / qreal(state->frames); + state->interval = qMax( 1, state->interval ); state->interval = (state->interval / MIN_TICK_RATE) * MIN_TICK_RATE; state->currentInterval = state->interval; state->receiver = receiver;