Fix raw icon error handling in dunstify

This commit is contained in:
Nikos Tsipinakis 2017-01-20 19:54:00 +02:00
parent 86c917fc95
commit dd4deb3b00

View File

@ -270,11 +270,14 @@ int main(int argc, char *argv[])
GError *err = NULL; GError *err = NULL;
if (raw_icon_path) { if (raw_icon_path) {
notify_notification_set_image_from_pixbuf(n, gdk_pixbuf_new_from_file(raw_icon_path, &err)); GdkPixbuf *raw_icon = gdk_pixbuf_new_from_file(raw_icon_path, &err);
if(err) { if(err) {
g_printerr("Unable to close notification: %s\n", err->message); g_printerr("Unable to get raw icon: %s\n", err->message);
die(1); die(1);
} }
notify_notification_set_image_from_pixbuf(n, raw_icon);
} }
if (close_id > 0) { if (close_id > 0) {