summaryrefslogtreecommitdiff
path: root/sys/dev/wscons
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-05-31 16:56:11 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-05-31 16:56:11 +0000
commit04684ad8eeedc3a81c03b3dabbab289dc8463cdb (patch)
tree22b74ce102f32d9b06b1a231a45f7d09aebf00a6 /sys/dev/wscons
parent3430153adb72ba5fc2d002c3ac8115af7f2211f0 (diff)
Make sure wsdisplay_kbdholdscreen() checks whether the screen has a tty
before invoking wsdisplay_kbdholdscr(), which assumes it does.
Diffstat (limited to 'sys/dev/wscons')
-rw-r--r--sys/dev/wscons/wsdisplay.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c
index f38e1f66364..4dff4d6b803 100644
--- a/sys/dev/wscons/wsdisplay.c
+++ b/sys/dev/wscons/wsdisplay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsdisplay.c,v 1.89 2009/01/10 23:02:47 miod Exp $ */
+/* $OpenBSD: wsdisplay.c,v 1.90 2009/05/31 16:56:10 miod Exp $ */
/* $NetBSD: wsdisplay.c,v 1.82 2005/02/27 00:27:52 perry Exp $ */
/*
@@ -2039,7 +2039,7 @@ wsdisplay_kbdholdscreen(struct device *dev, int hold)
struct wsscreen *scr;
scr = sc->sc_focus;
- if (scr != NULL)
+ if (scr != NULL && WSSCREEN_HAS_TTY(scr))
wsdisplay_kbdholdscr(scr, hold);
}