diff options
author | louis <louis.braun@gmx.de> | 2016-07-30 09:07:34 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2016-07-30 09:07:34 +0200 |
commit | dddb273526be87c8a2e235410ce0738db161d6f6 (patch) | |
tree | 033cd8e7a83e1cb469f7dc98942586f8c3ce0a04 /coreengine/animation.c | |
parent | b8d055f56824ffdccea658edcf71193477717f89 (diff) | |
download | vdr-plugin-skindesigner-dddb273526be87c8a2e235410ce0738db161d6f6.tar.gz vdr-plugin-skindesigner-dddb273526be87c8a2e235410ce0738db161d6f6.tar.bz2 |
fixed crash using too small list shifttimes
Diffstat (limited to 'coreengine/animation.c')
-rw-r--r-- | coreengine/animation.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/coreengine/animation.c b/coreengine/animation.c index 8f7159f..fc4393f 100644 --- a/coreengine/animation.c +++ b/coreengine/animation.c @@ -305,6 +305,7 @@ void cShifter::Init(void) { mode = (eShiftMode)shiftable->ShiftMode(); shiftable->ShiftPositions(&start, &end); int steps = (double)shifttime / (double)frametime; + if (steps <= 0) steps = 1; float percentFast = 33.3f; float distanceFast = 85.0f; stepsFast = (float)steps * percentFast / 100.0f; @@ -400,6 +401,7 @@ cListShifter::cListShifter(cListShiftable *shiftable) { distance = shiftable->ShiftDistance(); orientation = shiftable->ShiftOrientation(); int steps = (double)shifttime / (double)frametime; + if (steps <= 0) steps = 1; step = distance / steps; shiftin = true; fromtop = true; |