mirror of
https://github.com/lutris/lutris
synced 2024-09-30 04:54:18 +00:00
Update get_game_by_id() to check for game.id
There were cases where running_games objects didn't have `id` properties, running into python errors. Checking to ensure the property exists first keeps it from breaking.
This commit is contained in:
parent
271fe36efa
commit
70ae81866b
|
@ -374,7 +374,7 @@ class Application(Gtk.Application):
|
|||
|
||||
def get_game_by_id(self, game_id):
|
||||
for game in self.running_games:
|
||||
if game.id == game_id:
|
||||
if hasattr(game, 'id') and game.id == game_id:
|
||||
return game
|
||||
|
||||
@staticmethod
|
||||
|
|
Loading…
Reference in a new issue