(main): Fix coredump if invoked with no options.
Showing
1 changed file
with
7 additions
and
3 deletions
... | @@ -199,12 +199,16 @@ main (int argc, char **argv) | ... | @@ -199,12 +199,16 @@ main (int argc, char **argv) |
199 | mu_argp_init (program_version, NULL); | 199 | mu_argp_init (program_version, NULL); |
200 | mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc, | 200 | mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc, |
201 | opt_handler, NULL, NULL); | 201 | opt_handler, NULL, NULL); |
202 | if (!explicit_folder) | ||
203 | interactive = 1; | ||
204 | 202 | ||
205 | cur_folder_path = current_folder_path (); | 203 | cur_folder_path = current_folder_path (); |
206 | 204 | ||
207 | name = mh_expand_name (NULL, folder_name, 0); | 205 | if (!explicit_folder) |
206 | { | ||
207 | interactive = 1; | ||
208 | name = cur_folder_path; | ||
209 | } | ||
210 | else | ||
211 | name = mh_expand_name (NULL, folder_name, 0); | ||
208 | rmf (name); | 212 | rmf (name); |
209 | return 0; | 213 | return 0; |
210 | } | 214 | } | ... | ... |
-
Please register or sign in to post a comment