summaryrefslogtreecommitdiff
path: root/sys/dev/wscons/wsdisplay.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2002-05-05 17:16:40 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2002-05-05 17:16:40 +0000
commit0436208dcec70de4e056d27f7d20bef957c4968f (patch)
treec290426c6ea6b4e05ffd3add5be7394e2f3bf8e7 /sys/dev/wscons/wsdisplay.c
parente83997051c103aa7d5596b705118923addaea95e (diff)
fix panic triggered by using a 3.0 wsmoused on a 3.1 kernel, by
checking that wsms_dev is not NULL before dereferencing it. ok jbm@
Diffstat (limited to 'sys/dev/wscons/wsdisplay.c')
-rw-r--r--sys/dev/wscons/wsdisplay.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c
index 4a137396ad1..f8cc5532367 100644
--- a/sys/dev/wscons/wsdisplay.c
+++ b/sys/dev/wscons/wsdisplay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsdisplay.c,v 1.44 2002/04/30 23:07:48 mickey Exp $ */
+/* $OpenBSD: wsdisplay.c,v 1.45 2002/05/05 17:16:39 matthieu Exp $ */
/* $NetBSD: wsdisplay.c,v 1.37.4.1 2000/06/30 16:27:53 simonb Exp $ */
/*
@@ -3199,8 +3199,10 @@ wsmoused_release(struct wsdisplay_softc *sc)
}
/* inject event to notify wsmoused(8) to close mouse device */
- wsmouse_input(wsms_dev, 0, 0, 0, 0,
- WSMOUSE_INPUT_WSMOUSED_CLOSE);
+ if (wsms_dev != NULL)
+ wsmouse_input(wsms_dev, 0, 0, 0, 0,
+ WSMOUSE_INPUT_WSMOUSED_CLOSE);
+
}
#endif /* NWSMOUSE > 0 */
}