diff options
Diffstat (limited to 'console-client')
-rw-r--r-- | console-client/console.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/console-client/console.c b/console-client/console.c index 2fb2fbeb..2fa05339 100644 --- a/console-client/console.c +++ b/console-client/console.c @@ -226,10 +226,17 @@ console_switch_away (void) if (driver->ops->save_status) driver->ops->save_status (driver->handle); - saved_id = active_vcons->id; - saved_cons = active_vcons->cons; - cons_vcons_close (active_vcons); - active_vcons = NULL; + if (active_vcons) + { + saved_id = active_vcons->id; + saved_cons = active_vcons->cons; + cons_vcons_close (active_vcons); + active_vcons = NULL; + } + else + { + saved_cons = NULL; + } pthread_mutex_unlock (&global_lock); } |