X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=sima%2Fplugins%2Fcore%2Fhistory.py;h=4876eba3b4c61a6adb6d17c1850d4869506d0f83;hb=faf3ee6255dc9f21d4286f462179dedef7ee85da;hp=b85c0dd923b1cb302237fa299dbcd301b3d14cf6;hpb=a87663bced4a8aba44ca7b675c2c12d1b358b56f;p=mpd-sima.git diff --git a/sima/plugins/core/history.py b/sima/plugins/core/history.py index b85c0dd..4876eba 100644 --- a/sima/plugins/core/history.py +++ b/sima/plugins/core/history.py @@ -45,7 +45,7 @@ class History(Plugin): def callback_player(self): current = self.player.current last_hist = next(self.sdb.get_history(), None) - if last_hist[3] == current.file: + if last_hist and last_hist[3] == current.file: return if not current: self.log.debug('Cannot add "%s" to history (empty or missing file)', current)