mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-10 19:46:22 +00:00
[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
This commit is contained in:
parent
24a3987c3a
commit
90744dc2e6
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user