Fix a panic that occurs when resuming. For some reason, sc->cur_scp is

NULL.

Submitted by:	Andrew Thompson <andy@fud.org.nz>
This commit is contained in:
Nate Lawson 2003-10-29 20:48:13 +00:00
parent 96fd764f25
commit e8c321c92f
2 changed files with 7 additions and 0 deletions

View file

@ -2147,6 +2147,9 @@ sc_switch_scr(sc_softc_t *sc, u_int next_scr)
DPRINTF(5, ("sc0: sc_switch_scr() %d ", next_scr + 1));
if (sc->cur_scp == NULL)
return (0);
/* prevent switch if previously requested */
if (sc->flags & SC_SCRN_VTYLOCK) {
sc_bell(sc->cur_scp, sc->cur_scp->bell_pitch,

View file

@ -108,6 +108,10 @@ scsuspend(device_t dev)
sc_softc_t *sc;
sc = &main_softc;
if (sc->cur_scp == NULL)
return (0);
sc_cur_scr = sc->cur_scp->index;
if (sc_no_suspend_vtswitch)