diff options
Diffstat (limited to 'lib/libncurses')
-rw-r--r-- | lib/libncurses/lib_delwin.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libncurses/lib_delwin.c b/lib/libncurses/lib_delwin.c index e84e216..0edc73b 100644 --- a/lib/libncurses/lib_delwin.c +++ b/lib/libncurses/lib_delwin.c @@ -27,9 +27,10 @@ int i; free(win->_firstchar); free(win->_lastchar); free(win->_line); - free(win); - touchwin(curscr); + touchwin((win->_flags & _SUBWIN) ? win->_parent : curscr); + + free(win); return(OK); } |