mirror of
https://github.com/ndarilek/tts-rs.git
synced 2024-11-17 12:19:37 +00:00
Sanity-check value to prevent overflow.
This commit is contained in:
parent
eb936a4ae0
commit
1d7c668a4a
|
@ -60,7 +60,7 @@ impl Backend for WinRT {
|
|||
if state == MediaPlaybackState::Paused {
|
||||
let index = self.playback_list.current_item_index()?;
|
||||
let total = self.playback_list.items()?.size()?;
|
||||
if index == total - 1 {
|
||||
if total != 0 && index == total - 1 {
|
||||
self.playback_list.items()?.clear()?;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user