Potentially fix crash during import

This commit is contained in:
kramo
2024-01-22 11:50:22 +01:00
parent b707f90a3f
commit 7c9d9a317b

View File

@@ -211,7 +211,11 @@ class Importer(ErrorProducer):
pipeline: Pipeline = shared.store.add_game(game, additional_data)
if pipeline is not None:
logging.info("Imported %s (%s)", game.name, game.game_id)
pipeline.connect("advanced", self.pipeline_advanced_callback)
pipeline.connect(
"advanced",
# I'm not sure idle_add is needed here, but a widget is updated in the callback
lambda *args: GLib.idle_add(self.pipeline_advanced_callback, args),
)
self.game_pipelines.add(pipeline)
def update_progressbar(self) -> None: