plugins/timer: don't fail if file is corrupt (nw)

This commit is contained in:
cracyc 2016-04-24 17:06:25 -05:00
parent 169b790b99
commit 2028ec2917

View file

@ -55,6 +55,12 @@ function timer.startplugin()
play_count = file:read("n")
file:close()
end
if not play_count then
play_count = 0
end
if not total_time then
total_time = 0
end
start_time = os.time()
play_count = play_count + 1
end)