From 18962ca1447679a89c39f8a6942d2392677453f7 Mon Sep 17 00:00:00 2001 From: starnakin Date: Tue, 27 Feb 2024 10:15:01 +0100 Subject: [PATCH] game: fix: error when game is not in the gamemanager --- games/objects/GameManager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/games/objects/GameManager.py b/games/objects/GameManager.py index 0251f9e..54e43b4 100644 --- a/games/objects/GameManager.py +++ b/games/objects/GameManager.py @@ -8,6 +8,8 @@ class GameManager(): self._game_list: list[Game] = [] def remove(self, game: Game): + if (game not in self._game_list): + return self._game_list.remove(game) def get(self, game_id: int) -> Game: