libsaria: Check that next() returns a file

If next doesn't return a file, we shouldn't try to load something.  That
would just be silly.
This commit is contained in:
Bryan Schumaker 2011-05-15 10:26:38 -04:00
parent 67369e88a7
commit e3af5800b0
1 changed files with 2 additions and 1 deletions

View File

@ -37,7 +37,8 @@ def init2():
def pick_next():
global pause_after
file = sources.next()
load(file)
if file != None:
load(file)
if pause_after == True:
pause()
else: