Fixed an error where if player was resized quickly while trying to draw the playlist, the player would crash.
This commit is contained in:
@ -602,6 +602,7 @@ class Player:
|
|||||||
pair = curses.color_pair(2) | curses.A_REVERSE
|
pair = curses.color_pair(2) | curses.A_REVERSE
|
||||||
|
|
||||||
# Move and write text
|
# Move and write text
|
||||||
|
try:
|
||||||
self.playlist_win.move(line, 0)
|
self.playlist_win.move(line, 0)
|
||||||
|
|
||||||
if playlist_item is not None:
|
if playlist_item is not None:
|
||||||
@ -611,6 +612,10 @@ class Player:
|
|||||||
)
|
)
|
||||||
|
|
||||||
self.playlist_win.clrtoeol()
|
self.playlist_win.clrtoeol()
|
||||||
|
|
||||||
|
except curses.error:
|
||||||
|
return
|
||||||
|
|
||||||
line += 1
|
line += 1
|
||||||
|
|
||||||
self.playlist_win.refresh()
|
self.playlist_win.refresh()
|
||||||
|
Reference in New Issue
Block a user