[Position Slider] Fix invalid duration setting

Fix NaN condition occurring when an invalid file is played.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
swiftingly
Christopher Snowhill 2022-06-13 02:01:26 -07:00
parent 55c623c9a0
commit e5ff6cd23d
1 changed files with 2 additions and 0 deletions

View File

@ -18,6 +18,8 @@
}
- (void)setMaxValue:(double)value {
if(isnan(value) || isinf(value)) value = 0.0; // Clip invalid values from bad file playlist entries
self.positionTextField.duration = (long)value;
[super setMaxValue:value];