From 43b2b3bb1d777c8b4f63b790cb91ab2705a4ab17 Mon Sep 17 00:00:00 2001 From: Sascha Kruse Date: Thu, 13 Dec 2012 22:49:11 +0100 Subject: [PATCH] don't try to replace NULL icon --- dunst.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dunst.c b/dunst.c index c3d13a0..585b492 100644 --- a/dunst.c +++ b/dunst.c @@ -833,8 +833,10 @@ int init_notification(notification * n, int id) n->msg = string_replace("%a", n->appname, strdup(n->format)); n->msg = string_replace("%s", n->summary, n->msg); - n->msg = string_replace("%i", n->icon, n->msg); - n->msg = string_replace("%I", basename(n->icon), n->msg); + if (n->icon) { + n->msg = string_replace("%I", basename(n->icon), n->msg); + n->msg = string_replace("%i", n->icon, n->msg); + } n->msg = string_replace("%b", n->body, n->msg); if (n->progress) { char pg[10];