Initialize playtime attribute when invalid playtime found (Closes #1698)

This commit is contained in:
Mathieu Comandon 2019-02-03 00:16:18 -08:00
parent 3582df7cd8
commit f7f0e55309

View file

@ -67,6 +67,7 @@ class Game(GObject.Object):
self.playtime = float(game_data.get("playtime") or 0.0)
except ValueError:
logger.error("Invalid playtime value %s", game_data.get("playtime"))
self.playtime = 0.0
if self.game_config_id:
self.load_config()