diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-11-15 21:23:49 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-11-15 21:23:49 +0000 |
commit | 2072263bf079a516edfba90a9b89e93b8e02ff58 (patch) | |
tree | 0d00e2ee5d592b75a796fe36150dcf356d163f95 /sys/dev/wscons/wsdisplay.c | |
parent | 370188d7e2d13947c70b8129a7207ed687519d2a (diff) |
Make sure not to null deref the function pointer for the scrollback accessop
(some hardware drivers do not support this yet, i.e., vgafb in powerpc);
mickey@ ok
Diffstat (limited to 'sys/dev/wscons/wsdisplay.c')
-rw-r--r-- | sys/dev/wscons/wsdisplay.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c index 8fbc7e34c71..7a0125e95e3 100644 --- a/sys/dev/wscons/wsdisplay.c +++ b/sys/dev/wscons/wsdisplay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsdisplay.c,v 1.7 2000/11/15 20:00:39 aaron Exp $ */ +/* $OpenBSD: wsdisplay.c,v 1.8 2000/11/15 21:23:48 aaron Exp $ */ /* $NetBSD: wsdisplay.c,v 1.37.4.1 2000/06/30 16:27:53 simonb Exp $ */ /* @@ -1812,8 +1812,10 @@ wsscrollback(arg, op) if (op == WSCONS_SCROLL_BACKWARD) lines = -lines; - (*sc->sc_accessops->scrollback)(sc->sc_accesscookie, - sc->sc_focus->scr_dconf->emulcookie, lines); + if (sc->sc_accessops->scrollback) { + (*sc->sc_accessops->scrollback)(sc->sc_accesscookie, + sc->sc_focus->scr_dconf->emulcookie, lines); + } } /* |