From 783b2cc8217bdb9eca541fc756e679a2ee1eaa6d Mon Sep 17 00:00:00 2001 From: Sascha Kruse Date: Mon, 25 Feb 2013 14:43:48 +0100 Subject: [PATCH] fix segfault when no actions are specified --- dunstify.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dunstify.c b/dunstify.c index c2891ef..888a7eb 100644 --- a/dunstify.c +++ b/dunstify.c @@ -254,9 +254,10 @@ int main(int argc, char *argv[]) l = g_main_loop_new(NULL, false); g_signal_connect(n, "closed", G_CALLBACK(closed), NULL); - for (int i = 0; action_strs[i]; i++) { - add_action(n, action_strs[i]); - } + if (action_strs) + for (int i = 0; action_strs[i]; i++) { + add_action(n, action_strs[i]); + } notify_notification_show(n, &err);