Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/sushi After showing help, touchwin/wrefresh the std...



details:   https://anonhg.NetBSD.org/src/rev/447513d71a27
branches:  trunk
changeset: 534444:447513d71a27
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Fri Jul 26 08:43:26 2002 +0000

description:
After showing help, touchwin/wrefresh the stdscr, do not try to do
that for form subwindow, which may be NULL (or is always, even?).

This fixes SIGSEGV when one goes to
Network related configuration -> Modify the hosts file -> Delete host entries
and presses F1 (Help).

diffstat:

 usr.sbin/sushi/scanform.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (29 lines):

diff -r 1d167f966e2e -r 447513d71a27 usr.sbin/sushi/scanform.c
--- a/usr.sbin/sushi/scanform.c Fri Jul 26 07:59:33 2002 +0000
+++ b/usr.sbin/sushi/scanform.c Fri Jul 26 08:43:26 2002 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: scanform.c,v 1.24 2002/07/26 07:59:33 jdolecek Exp $       */
+/*      $NetBSD: scanform.c,v 1.25 2002/07/26 08:43:26 jdolecek Exp $       */
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -408,7 +408,6 @@
 static int 
 my_driver(FORM * form, int c, char *path)
 {
-       WINDOW *subwindow;
        CDKSCROLL *plist;
        CDKSELECTION *slist;
        CDKENTRY *entry;
@@ -483,9 +482,8 @@
        case SHOWHELP:
                if (simple_lang_handler(path, HELPFILE, handle_help) == -2)
                        nohelp();
-               subwindow = form_win(form);
-               touchwin(subwindow);
-               wrefresh(subwindow);
+               touchwin(stdscr);
+               wrefresh(stdscr);
                return(FALSE);
                /* NOTREACHED */
                break;



Home | Main Index | Thread Index | Old Index