From bd84bcb70dea54adb7c08a7bfb9a0f96a3f226a6 Mon Sep 17 00:00:00 2001 From: Bernard Nauwelaerts Date: Fri, 2 Sep 2016 14:05:24 +0200 Subject: [PATCH] fix/sigsegv-due-to-null-notification-category --- notification.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/notification.c b/notification.c index 21ccfee..af37e9e 100644 --- a/notification.c +++ b/notification.c @@ -335,6 +335,10 @@ int notification_init(notification * n, int id) n->format = settings.format; + if (n->category == NULL) { + n->category = ""; + } + rule_apply_all(n); n->urls = notification_extract_markup_urls(&(n->body)); @@ -450,10 +454,6 @@ int notification_init(notification * n, int id) n->icon = strdup(settings.icons[n->urgency]); } - if (n->category == NULL) { - n->category = ""; - } - n->timestamp = time(NULL); n->redisplayed = false;