summaryrefslogtreecommitdiff
path: root/sys/dev/wscons/wskbd.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-08-01 23:36:53 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-08-01 23:36:53 +0000
commit2161eadc3fd63fed7b4b7821c96bdac73de6672d (patch)
tree6c9d2fb34e91a4d076f957d209221e21dd33d0c8 /sys/dev/wscons/wskbd.c
parentbda1e149bb2d07f551f4fb18a8e57f7a4fde52c9 (diff)
Avoid a few NULL dereferences, and boot -c works on vax with glass console.
Diffstat (limited to 'sys/dev/wscons/wskbd.c')
-rw-r--r--sys/dev/wscons/wskbd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/wscons/wskbd.c b/sys/dev/wscons/wskbd.c
index 9aa645c9ae1..504f092b67e 100644
--- a/sys/dev/wscons/wskbd.c
+++ b/sys/dev/wscons/wskbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wskbd.c,v 1.48 2006/07/31 21:54:46 miod Exp $ */
+/* $OpenBSD: wskbd.c,v 1.49 2006/08/01 23:36:52 miod Exp $ */
/* $NetBSD: wskbd.c,v 1.80 2005/05/04 01:52:16 augustss Exp $ */
/*
@@ -1489,7 +1489,7 @@ wskbd_translate(struct wskbd_internal *id, u_int type, int value)
if (type == WSCONS_EVENT_ALL_KEYS_UP) {
#if NWSDISPLAY > 0
- if (sc->sc_repeating) {
+ if (sc != NULL && sc->sc_repeating) {
sc->sc_repeating = 0;
timeout_del(&sc->sc_repeat_ch);
}