about summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-07-29 11:08:28 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-07-29 11:08:28 +0000
commita5a27ad5ec261188e66f53fb1145a6e5fb291cd4 (patch)
tree2a8dc150cfacf30aa4cb9dc952caecc287ab3183 /Src/Zle
parentf554a8af16d8ff6ed23eb83de18c7994b0e1d005 (diff)
downloadzsh-a5a27ad5ec261188e66f53fb1145a6e5fb291cd4.tar.gz
zsh-a5a27ad5ec261188e66f53fb1145a6e5fb291cd4.tar.xz
zsh-a5a27ad5ec261188e66f53fb1145a6e5fb291cd4.zip
<hamer@hamer.org.ua>: 28104: fix completion crash due to NULL pointer.
Actually commit the code.
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/compcore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
index 529537d37..ee44c46ef 100644
--- a/Src/Zle/compcore.c
+++ b/Src/Zle/compcore.c
@@ -2932,7 +2932,7 @@ add_match_data(int alt, char *str, char *orig, Cline line,
 		comp_setunset(0, 0, CP_EXACTSTR, 0);
 	    }
 	    ai->exactm = cm;
-	} else if (useexact && !matcheq(cm, ai->exactm)) {
+	} else if (useexact && (!ai->exactm || !matcheq(cm, ai->exactm))) {
 	    ai->exact = 2;
 	    ai->exactm = NULL;
 	    if (incompfunc)