Avoid null pointer dereference so that boot -d works again.
This commit is contained in:
parent
7eab063a4f
commit
62a4aefda9
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wsdisplay.c,v 1.47 2001/01/03 23:00:24 enami Exp $ */
|
||||
/* $NetBSD: wsdisplay.c,v 1.48 2001/01/03 23:03:45 enami Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.47 2001/01/03 23:00:24 enami Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.48 2001/01/03 23:03:45 enami Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
|
@ -1782,6 +1782,9 @@ wsdisplay_pollc(dev, on)
|
|||
struct wsdisplay_softc *sc;
|
||||
|
||||
sc = device_lookup(&wsdisplay_cd, WSDISPLAYUNIT(dev));
|
||||
if (sc == NULL)
|
||||
/* cnpollc() may be called before attach */
|
||||
return;
|
||||
|
||||
wsdisplay_cons_pollmode = on;
|
||||
|
||||
|
|
Loading…
Reference in New Issue