summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2002-03-16 22:11:56 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2002-03-16 22:11:56 +0000
commit0a088e49872c78884b81489970c72a4df5e59568 (patch)
tree48493008c510edc512546cdf3e304deafa6d5a03 /sys/dev
parent1daa13fcbe785db8b8d3cd5692f101af9a0ac6d2 (diff)
skip absent screens; from leonardo@cefetpr.br
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/wscons/wsdisplay.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c
index c2a1df68c13..804b862bebd 100644
--- a/sys/dev/wscons/wsdisplay.c
+++ b/sys/dev/wscons/wsdisplay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsdisplay.c,v 1.39 2002/03/14 04:55:20 mickey Exp $ */
+/* $OpenBSD: wsdisplay.c,v 1.40 2002/03/16 22:11:55 mickey Exp $ */
/* $NetBSD: wsdisplay.c,v 1.37.4.1 2000/06/30 16:27:53 simonb Exp $ */
/*
@@ -2215,17 +2215,18 @@ ctrl_event(u_int type, int value, struct wsdisplay_softc *ws_sc, struct proc *p)
Paste_avail = 0;
return (0);
}
- for (i = 0 ; i < WSDISPLAY_DEFAULTSCREENS ; i++) {
- sc->sc_scr[i]->mouse =
- ((WS_NCOLS(sc->sc_scr[i]) *
- WS_NROWS(sc->sc_scr[i])) / 2);
- sc->sc_scr[i]->cursor = sc->sc_scr[i]->mouse;
- sc->sc_scr[i]->cpy_start = 0;
- sc->sc_scr[i]->cpy_end = 0;
- sc->sc_scr[i]->orig_start = 0;
- sc->sc_scr[i]->orig_end = 0;
- sc->sc_scr[i]->mouse_flags = 0;
- }
+ for (i = 0 ; i < WSDISPLAY_DEFAULTSCREENS ; i++)
+ if (sc->sc_scr[i]) {
+ sc->sc_scr[i]->mouse =
+ ((WS_NCOLS(sc->sc_scr[i]) *
+ WS_NROWS(sc->sc_scr[i])) / 2);
+ sc->sc_scr[i]->cursor = sc->sc_scr[i]->mouse;
+ sc->sc_scr[i]->cpy_start = 0;
+ sc->sc_scr[i]->cpy_end = 0;
+ sc->sc_scr[i]->orig_start = 0;
+ sc->sc_scr[i]->orig_end = 0;
+ sc->sc_scr[i]->mouse_flags = 0;
+ }
return (0);
}