summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/shell/main_logoff.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libmisc/shell/main_logoff.c')
-rw-r--r--cpukit/libmisc/shell/main_logoff.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpukit/libmisc/shell/main_logoff.c b/cpukit/libmisc/shell/main_logoff.c
index 0535d092cb..e902744b6d 100644
--- a/cpukit/libmisc/shell/main_logoff.c
+++ b/cpukit/libmisc/shell/main_logoff.c
@@ -25,9 +25,12 @@ static int rtems_shell_main_logoff(
char *argv[] __attribute__((unused))
)
{
+ rtems_shell_env_t *env = rtems_shell_get_current_env();
+
printf("logoff from the system...");
- rtems_current_shell_env->exit_shell = true;
+ if (env)
+ env->exit_shell = true;
return 0;
}