[balsa/wip/gmime3] Continue when icons are missing



commit 7ffc3ca04d33a07700d81c85a21dbda1b2fdc7b8
Author: Pawel Salek <pawsa0 gmail com>
Date:   Fri Jun 1 06:29:37 2018 +0100

    Continue when icons are missing
    
    * src/balsa-icons.c: don't let missing icons stop balsa.

 ChangeLog         | 4 ++++
 src/balsa-icons.c | 6 +++++-
 2 files changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/ChangeLog b/ChangeLog
index 2fbba550..200fb322 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2018-06-01  Pawel Salek  <pawsa0 gmail com>
+
+       * src/balsa-icons.c: don't let missing icons stop balsa.
+
 2018-05-31  Peter Bloomfield  <pbloomfield bellsouth net>
 
        Use g_strcmp0() for NULL-safe comparisons
diff --git a/src/balsa-icons.c b/src/balsa-icons.c
index 71e4987a..d1818d90 100644
--- a/src/balsa-icons.c
+++ b/src/balsa-icons.c
@@ -76,8 +76,12 @@ load_balsa_pixmap(GtkIconTheme *icon_theme, const balsa_pixmap_t *bpixmap)
      * alternative name if not */
     if (!gtk_icon_theme_has_icon(icon_theme, bpixmap->stock_id)) {
        pixmap_fallback_t *fb = fallback_id;
-       while (g_strcmp0(fb->def_id, bpixmap->stock_id) != 0)
+       while (fb->def_id && g_strcmp0(fb->def_id, bpixmap->stock_id) != 0)
            fb++;
+       if (!fb->def_id) {
+           BICONS_LOG("No GTK or custom icon for %s\n", bpixmap);
+           return;
+       }
        if (fb->def_id) {
            use_id = fb->fb_id;
             BICONS_LOG("\t(%s not found, fall back to %s)",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]