about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/Zle/complete.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index abacec9c0..db900e46c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-08-24  Sven Wischnowsky  <wischnow@zsh.org>
+
+	* 15705: Src/Zle/complete.c: test if hash table pointer is NULL
+	to avoid SEGV with compstate=()
+
 2001-08-22  Clint Adams  <clint@zsh.org>
 
         * 15683: Completion/Unix/Command/.distfiles,
diff --git a/Src/Zle/complete.c b/Src/Zle/complete.c
index e63286974..5f034a4a9 100644
--- a/Src/Zle/complete.c
+++ b/Src/Zle/complete.c
@@ -1054,6 +1054,9 @@ set_compstate(Param pm, HashTable ht)
     struct value v;
     char *str;
 
+    if (!ht)
+        return;
+
     for (i = 0; i < ht->hsize; i++)
 	for (hn = ht->nodes[i]; hn; hn = hn->next)
 	    for (cp = compkparams,