From 733d10d283b596a5adac07f42f15c73431b85a41 Mon Sep 17 00:00:00 2001 From: Jaakko Heinonen Date: Tue, 12 Jun 2001 13:49:37 +0000 Subject: [PATCH] Added null check in launch_mutt --- abook.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/abook.c b/abook.c index 2cbbbd1..9c42c08 100644 --- a/abook.c +++ b/abook.c @@ -295,6 +295,10 @@ void launch_mutt(int item) { char *cmd = NULL, *mailstr = NULL; + char *mutt_command = options_get_str("mutt_command"); + + if(mutt_command == NULL || !*mutt_command) + return; if( is_valid_item(item) ) mailstr = make_mailstr(item); @@ -310,7 +314,7 @@ launch_mutt(int item) } } - cmd = strconcat(options_get_str("mutt_command"), " \'", mailstr, + cmd = strconcat(mutt_command, " \'", mailstr, "\'", NULL); free(mailstr); #ifdef DEBUG -- 2.39.2