mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-19 19:14:55 +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
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue