]> git.deb.at Git - pkg/abook.git/commitdiff
Added null check in launch_mutt
authorJaakko Heinonen <jheinonen@users.sourceforge.net>
Tue, 12 Jun 2001 13:49:37 +0000 (13:49 +0000)
committerJaakko Heinonen <jheinonen@users.sourceforge.net>
Tue, 12 Jun 2001 13:49:37 +0000 (13:49 +0000)
abook.c

diff --git a/abook.c b/abook.c
index 2cbbbd1244b3d115e8ce98b2e8ae7a0775c33eb6..9c42c08d802c87043eeea74922bafe436568672a 100644 (file)
--- 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