aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shell/ash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index c333b235b..84502636a 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -5409,7 +5409,7 @@ popredir(int drop, int restore)
struct redirtab *rp;
int i;
- if (--g_nullredirs >= 0)
+ if (--g_nullredirs >= 0 || redirlist == NULL)
return;
INT_OFF;
rp = redirlist;