1
0
Fork 0
mirror of synced 2024-06-26 18:20:50 +12:00

Fix crash for Fortnite extension pack

This commit is contained in:
Dummerle 2022-03-16 17:46:57 +01:00
parent 639fceae55
commit 16fa26e1df
No known key found for this signature in database
GPG key ID: AB68CC59CA39F2F1

View file

@ -194,6 +194,9 @@ class GamesTab(QStackedWidget, Ui_GamesTab):
for game in self.no_assets:
icon_widget, list_widget = self.add_installed_widget(game.app_name)
if not icon_widget or not list_widget:
logger.warning(f"Ignoring {game.app_name} in game list")
continue
self.icon_view.layout().addWidget(icon_widget)
self.list_view.layout().addWidget(list_widget)
@ -227,7 +230,7 @@ class GamesTab(QStackedWidget, Ui_GamesTab):
list_widget = InstalledListWidget(app_name, pixmap, self.game_utils)
except Exception as e:
logger.error(f"{app_name} is broken. Don't add it to game list: {e}")
return
return None, None
self.widgets[app_name] = (icon_widget, list_widget)
@ -253,7 +256,7 @@ class GamesTab(QStackedWidget, Ui_GamesTab):
list_widget = ListWidgetUninstalled(self.core, game, pixmap)
except Exception as e:
logger.error(f"{game.app_name} is broken. Don't add it to game list: {e}")
return
return None, None
icon_widget.show_uninstalled_info.connect(self.show_uninstalled_info)
list_widget.show_uninstalled_info.connect(self.show_uninstalled_info)
@ -361,7 +364,10 @@ class GamesTab(QStackedWidget, Ui_GamesTab):
self.widgets.pop(app_name)
game = self.core.get_game(app_name, False)
self.add_uninstalled_widget(game)
try:
self.add_uninstalled_widget(game)
except Exception:
pass
update_list = True
# do not update, if only update finished
@ -406,7 +412,10 @@ class GamesTab(QStackedWidget, Ui_GamesTab):
self.widgets.pop(name)
game = self.core.get_game(name, False)
self.add_uninstalled_widget(game)
try:
self.add_uninstalled_widget(game)
except Exception:
pass
for igame in sorted(
self.core.get_installed_list(), key=lambda x: x.title
@ -471,6 +480,9 @@ class GamesTab(QStackedWidget, Ui_GamesTab):
logger.warning("Found installed game, without widget. Generating widget... ")
try:
i_widget, l_widget = self.add_uninstalled_widget(game)
if not i_widget or not l_widget:
logger.warning(f"Ignoring {game.app_name}")
continue
icon_layout.addWidget(i_widget)
list_layout.addWidget(l_widget)
except Exception as e: