diff --git a/bemani/backend/jubeat/base.py b/bemani/backend/jubeat/base.py index 4d76b33..4d10d25 100644 --- a/bemani/backend/jubeat/base.py +++ b/bemani/backend/jubeat/base.py @@ -176,8 +176,11 @@ class JubeatBase(CoreHandler, CardManagerHandler, PASELIHandler, Base): scores = self.data.remote.music.get_scores(self.game, self.music_version, userid) else: # We will want to fetch the remaining scores that were in our - # cache. - scores = self.cache.get(cache_key) + # cache. If the cache is empty, due to some error, or because + # we cached nothing below, then we will end up returning an + # empty list. This shouldn't happen, but guard against crashing + # if this returns None anyway. + scores = self.cache.get(cache_key) or [] if len(scores) < 50: # We simply return the whole amount for this, and cache nothing.