summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2002-01-26 21:03:36 +0000
committerBart Schaefer <barts@users.sourceforge.net>2002-01-26 21:03:36 +0000
commit9113c2e2d6ff5607f981aaf75b806e52c61f76a5 (patch)
tree2d4c194f2a63fdf132669231a6ac1337cca15af9 /Src
parent8840ce7144ed8f28fa44f4f93d2c3cece85aa09c (diff)
downloadzsh-9113c2e2d6ff5607f981aaf75b806e52c61f76a5.tar.gz
zsh-9113c2e2d6ff5607f981aaf75b806e52c61f76a5.tar.xz
zsh-9113c2e2d6ff5607f981aaf75b806e52c61f76a5.zip
16435: Fix core dump in `hash'.
Diffstat (limited to 'Src')
-rw-r--r--Src/builtin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index 0a399e068..9c139fd5a 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -2659,7 +2659,7 @@ bin_hash(char *name, char **argv, char *ops, int func)
 		zwarnnam(name, "bad pattern : %s", *argv, 0);
 		returnval = 1;
 	    }
-	} else if((asg = getasg(*argv))->value) {
+	} else if ((asg = getasg(*argv)) && asg->value) {
 	    if(isset(RESTRICTED)) {
 		zwarnnam(name, "restricted: %s", asg->value, 0);
 		returnval = 1;