diff --git a/src/rules.c b/src/rules.c index dc8e465..d568218 100644 --- a/src/rules.c +++ b/src/rules.c @@ -19,8 +19,11 @@ void rule_apply(rule_t * r, notification * n) n->allow_markup = r->allow_markup; if (r->plain_text != -1) n->plain_text = r->plain_text; - if (r->new_icon) - n->icon = r->new_icon; + if (r->new_icon) { + if(n->icon) + g_free(n->icon); + n->icon = g_strdup(r->new_icon); + } if (r->fg) n->color_strings[ColFG] = r->fg; if (r->bg)