1
mirror of https://github.com/mpv-player/mpv synced 2024-11-14 22:48:35 +01:00

osc: fix crash after reaching a certain position in limited lists

Don't try to display more items than there are in the chapter/playlist.
Fixes #3691
This commit is contained in:
Ricardo Constantino 2016-10-20 19:02:32 +01:00
parent 773d52162e
commit a6da4faac5
No known key found for this signature in database
GPG Key ID: EFD16019AE4FF531

View File

@ -672,7 +672,7 @@ function limited_list(prop, pos)
end
end
for i=min+1, max do
for i=min+1, math.min(max, count) do
local item = proplist[i]
item.current = (i-1 == pos) and true or nil
table.insert(temp, item)