diff options
author | Philipp Hörist <forenjunkie@chello.at> | 2017-07-02 16:13:19 +0300 |
---|---|---|
committer | Philipp Hörist <forenjunkie@chello.at> | 2017-07-02 16:13:53 +0300 |
commit | 6880fba3b4e3603de31f38a24c2fdf247fe6a420 (patch) | |
tree | 30a6b856ee08c6c2509fd315af638f3cd6afba10 /src | |
parent | 6d9f82d827bb3daed84bc5982fdca70d0431103a (diff) |
Raise exception for missing icons
This is a regression from https://dev.gajim.org/gajim/gajim/commit/9dc389cc32f8bc8f51c694f54b5a4785c04c5296
previously we used load_icon() which raises an exception for missing icons
now we use lookup_icon() which does not, and iconinfo can be None now
Diffstat (limited to 'src')
-rw-r--r-- | src/gtkgui_helpers.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gtkgui_helpers.py b/src/gtkgui_helpers.py index 18db3efb5..78f188cfc 100644 --- a/src/gtkgui_helpers.py +++ b/src/gtkgui_helpers.py @@ -59,6 +59,8 @@ class Color: def get_icon_pixmap(icon_name, size=16, color=None, quiet=False): try: iconinfo = gtk_icon_theme.lookup_icon(icon_name, size, 0) + if not iconinfo: + raise GLib.GError if color: pixbuf, was_symbolic = iconinfo.load_symbolic(*color) return pixbuf |