From 49cc8db22f77321faa31869f82d3cfa96e99c342 Mon Sep 17 00:00:00 2001 From: derrod Date: Sat, 8 Jan 2022 22:10:01 +0100 Subject: [PATCH] [core] Add None check to get_game_tip() --- legendary/core.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/legendary/core.py b/legendary/core.py index 6777654..1ab3979 100644 --- a/legendary/core.py +++ b/legendary/core.py @@ -298,7 +298,11 @@ class LegendaryCore: return self.lgd.get_cached_version()['data'].get('release_info') def get_game_tip(self, app_name): - return self.lgd.get_cached_version()['data'].get('game_wiki', {}).get(app_name, {}).get(sys_platform) + update_info = self.lgd.get_cached_version()['data'] + if not update_info: + return None + + return update_info.get('game_wiki', {}).get(app_name, {}).get(sys_platform) def get_sdl_data(self, app_name, platform='Windows'): if platform not in ('Win32', 'Windows'):