diff --git a/src/prompt.c b/src/prompt.c index 1a89a50a..3519a548 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -617,7 +617,7 @@ int do_prompt(bool allow_tabs, bool allow_files, bottombars(menu); - if (answer != curranswer) + if (answer != curranswer || answer == NULL) answer = mallocstrcpy(answer, curranswer); #ifndef NANO_TINY