summaryrefslogtreecommitdiff
path: root/variables.c
diff options
context:
space:
mode:
Diffstat (limited to 'variables.c')
-rw-r--r--variables.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/variables.c b/variables.c
index daacdbf0..7bb850fa 100644
--- a/variables.c
+++ b/variables.c
@@ -3660,7 +3660,7 @@ chkexport (name)
SHELL_VAR *v;
v = find_variable (name);
- if (exported_p (v))
+ if (v && exported_p (v))
{
array_needs_making = 1;
maybe_make_export_env ();