diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1999-01-14 11:32:14 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1999-01-14 11:32:14 +0000 |
commit | d455fa10e0ff12bdb5d2b2736200e89469db396c (patch) | |
tree | e7bc703e157e31256a7fa6671121a8e2f8c24d65 /mx.c | |
parent | 8a665d15928e6201d5d2a50addc4bc0bf44bd735 (diff) |
Fix a couple of segfaults related to using curses when it isn't there.
Diffstat (limited to 'mx.c')
-rw-r--r-- | mx.c | 30 |
1 files changed, 16 insertions, 14 deletions
@@ -106,23 +106,25 @@ static int dotlock_file (const char *path, int retry) retry_lock: mutt_clear_error(); - if((r = invoke_dotlock(path, flags, retry)) == DL_EX_EXIST - && !option (OPTNOCURSES)) + if((r = invoke_dotlock(path, flags, retry)) == DL_EX_EXIST) { - char msg[LONG_STRING]; - - snprintf(msg, sizeof(msg), _("Lock count exceeded, remove lock for %s?"), - path); - if(retry && mutt_yesorno(msg, 1) == 1) + if (!option (OPTNOCURSES)) { - flags |= DL_FL_FORCE; - retry--; - goto retry_lock; + char msg[LONG_STRING]; + + snprintf(msg, sizeof(msg), _("Lock count exceeded, remove lock for %s?"), + path); + if(retry && mutt_yesorno(msg, 1) == 1) + { + flags |= DL_FL_FORCE; + retry--; + goto retry_lock; + } + } + else + { + mutt_error ( _("Can't dotlock %s.\n"), path); } - } - else if (option (OPTNOCURSES)) - { - mutt_error ( _("Can't dotlock %s.\n"), path); } return (r == DL_EX_OK ? 0 : -1); } |