ensure frameInterval isn't zero, prevents div-by-zero
BUG:190218 svn path=/trunk/KDE/kdelibs/; revision=957201
This commit is contained in:
parent
04a722f05b
commit
6804f6fe65
@ -379,7 +379,7 @@ int Animator::customAnimation(int frames, int duration, Animator::CurveShape cur
|
||||
state->frames = frames;
|
||||
state->currentFrame = 0;
|
||||
state->curve = curve;
|
||||
state->frameInterval = duration / qreal(state->frames);
|
||||
state->frameInterval = qMax(qreal(1.0), duration / qreal(state->frames));
|
||||
state->interval = qMax(MIN_TICK_RATE_INT, state->frameInterval - (state->frameInterval % MIN_TICK_RATE_INT));
|
||||
state->currentInterval = state->interval;
|
||||
state->receiver = receiver;
|
||||
|
Loading…
Reference in New Issue
Block a user