diff options
author | Peter Poeml <poeml@suse.de> | 2014-12-06 07:50:16 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2014-12-06 07:50:16 +0000 |
commit | c6f15256e92b79252c33d01623370effbf5cdb3f (patch) | |
tree | ac8c1c35c0205bb301a3021db3db8e45c759c40e /terms.c | |
parent | Merge branch 'feature/w3m-img-freebsd' (diff) | |
download | w3m-c6f15256e92b79252c33d01623370effbf5cdb3f.tar.gz w3m-c6f15256e92b79252c33d01623370effbf5cdb3f.zip |
Prevent segfault when editing a textarea field with vi
add fix for segfault that can occur when editing a textarea field
with vi, and returning to w3m (it seems to happen if the terminal
is not writable, as when using w3m after 'su - some_user')
Origin: https://build.opensuse.org/package/view_file/openSUSE:Factory/w3m/w3m-0.4.1-textarea-segfault.dif?expand=1
Diffstat (limited to 'terms.c')
-rw-r--r-- | terms.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -637,7 +637,8 @@ reset_tty(void) writestr(T_se); /* reset terminal */ flush_tty(); TerminalSet(tty, &d_ioval); - close_tty(); + if (tty != 2) + close_tty(); } static MySignalHandler |