[Position Slider] Fix invalid duration setting

Fix NaN condition occurring when an invalid file is played.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
Christopher Snowhill 2022-06-13 02:01:26 -07:00
parent 55c623c9a0
commit e5ff6cd23d

View file

@ -18,6 +18,8 @@
} }
- (void)setMaxValue:(double)value { - (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; self.positionTextField.duration = (long)value;
[super setMaxValue:value]; [super setMaxValue:value];