diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2022-02-08 19:46:59 +0000 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2022-02-09 19:53:17 +0000 |
commit | 90744dc2e698050e7d34c3d4d064f517e99ba2a7 (patch) | |
tree | 66854fdc3609925d91ff3b3cdf4a7c004cf29a5c | |
parent | 24a3987c3af69a835fb9f600ea71f4512ec7a8e5 (diff) | |
download | deluge-90744dc2e698050e7d34c3d4d064f517e99ba2a7.tar.gz deluge-90744dc2e698050e7d34c3d4d064f517e99ba2a7.tar.bz2 deluge-90744dc2e698050e7d34c3d4d064f517e99ba2a7.zip |
[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
-rw-r--r-- | deluge/ui/gtk3/common.py | 5 |
1 files changed, 5 insertions, 0 deletions
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) |