Fix crash for Fortnite extension pack
This commit is contained in:
parent
639fceae55
commit
16fa26e1df
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue