From: Jaakko Heinonen Date: Tue, 12 Jun 2001 13:49:37 +0000 (+0000) Subject: Added null check in launch_mutt X-Git-Tag: upstream/0.6.1~2^2~362 X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=733d10d283b596a5adac07f42f15c73431b85a41;p=pkg%2Fabook.git Added null check in launch_mutt --- 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