Skip to content

Commit

Permalink
Add log message when failing to load an icon
Browse files Browse the repository at this point in the history
  • Loading branch information
tsipinakis committed May 14, 2018
1 parent 806ba9b commit 2a1c494
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/icon.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ static GdkPixbuf *get_pixbuf_from_file(const char *filename)
if (is_readable_file(filename)) {
GError *error = NULL;
pixbuf = gdk_pixbuf_new_from_file(filename, &error);
if (!pixbuf)
if (!pixbuf) {
LOG_W("%s", error->message);
g_error_free(error);
}
}
return pixbuf;
}
Expand Down Expand Up @@ -116,7 +118,7 @@ GdkPixbuf *get_pixbuf_from_icon(const char *iconname)
} while (*(end) != '\0');
}
if (!pixbuf)
LOG_W("Could not load icon: '%s'", iconname);
LOG_W("No icon found for: '%s'", iconname);

g_free(uri_path);
return pixbuf;
Expand Down

0 comments on commit 2a1c494

Please sign in to comment.