From 90744dc2e698050e7d34c3d4d064f517e99ba2a7 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Tue, 8 Feb 2022 19:46:59 +0000 Subject: [PATCH] [GTK] Workaround crash on Windows with ico or gif icons A problem with GdkPixbuf loaders on Windows causes a hard crash when attempting to load ico or gif tracker icons. Added a workaround by skipping these icon types until a more permanent solution is found. Ref: https://dev.deluge-torrent.org/ticket/3501 --- deluge/ui/gtk3/common.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/deluge/ui/gtk3/common.py b/deluge/ui/gtk3/common.py index 7dd043f1d..42a14b407 100644 --- a/deluge/ui/gtk3/common.py +++ b/deluge/ui/gtk3/common.py @@ -70,6 +70,11 @@ def get_pixbuf(filename: str, size: int = 0) -> Pixbuf: A newly created pixbuf """ + # Skip ico and gif that cause Pixbuf crash on Windows + # https://dev.deluge-torrent.org/ticket/3501 + if windows_check() and filename.endswith(('.ico', '.gif')): + return create_blank_pixbuf(size) + if not os.path.isabs(filename): filename = get_pixmap(filename)