about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2024-02-04 16:25:14 +0100
committerMikael Magnusson <mikachu@gmail.com>2024-02-04 16:48:02 +0100
commitec446a6f349c3f0a31ccd4cd21a257555bf53382 (patch)
treebcfe0fcedc150d7f303ba418a20685a26a442303 /Src
parentc8f0946ddc428ff2d44e304d188b238c20c56484 (diff)
downloadzsh-ec446a6f349c3f0a31ccd4cd21a257555bf53382.tar.gz
zsh-ec446a6f349c3f0a31ccd4cd21a257555bf53382.tar.xz
zsh-ec446a6f349c3f0a31ccd4cd21a257555bf53382.zip
52516: fix crash in %H when hlgroups is empty
typeset -A .zle.hlgroups; print -P %H
Diffstat (limited to 'Src')
-rw-r--r--Src/prompt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/prompt.c b/Src/prompt.c
index ec79067cd..b1e5041bd 100644
--- a/Src/prompt.c
+++ b/Src/prompt.c
@@ -257,7 +257,7 @@ parsehighlight(char *arg, char endchar, zattr *atr)
     {
 	Param node;
 	HashTable ht = v->pm->gsu.h->getfn(v->pm);
-	if ((node = (Param) ht->getnode(ht, arg))) {
+	if (ht && (node = (Param) ht->getnode(ht, arg))) {
 	    attrs = node->gsu.s->getfn(node);
 	    entered = 1;
 	    if (match_highlight(attrs, atr, 0) == attrs)