Check for empty playlist on startup

Before setting libsaria.sources.cur_lib_id, we should check that the
playlist has something to set it to.
This commit is contained in:
Bryan Schumaker 2010-12-03 08:19:32 -05:00
parent bd342e1d38
commit 80ac3a6103
1 changed files with 2 additions and 1 deletions

View File

@ -53,7 +53,8 @@ def load():
recent = objects[1]
cur_index = objects[2]
song_set = set(song_list)
libsaria.sources.cur_lib_id = song_list[cur_index]
if cur_index >= 0:
libsaria.sources.cur_lib_id = song_list[cur_index]
def load_bg2(callback):
load()