mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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:
parent
96fd764f25
commit
e8c321c92f
2 changed files with 7 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue