From b70ec86efeef1c3e277f26922ceecfd678939c29 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Fri, 24 Aug 2001 09:25:38 +0000 Subject: test if hash table pointer is NULL to avoid SEGV with compstate=() (15705) --- Src/Zle/complete.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Src/Zle/complete.c') diff --git a/Src/Zle/complete.c b/Src/Zle/complete.c index f9a160bb7..cd78796c9 100644 --- a/Src/Zle/complete.c +++ b/Src/Zle/complete.c @@ -1072,6 +1072,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, -- cgit 1.4.1