Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: fix for zle -C



...it seg-faulted when given a name for which there is no widget (as
the second argument).

Bye
 Sven

diff -u os/Zle/zle_thingy.c Src/Zle/zle_thingy.c
--- os/Zle/zle_thingy.c	Tue Mar 23 11:57:07 1999
+++ Src/Zle/zle_thingy.c	Wed Mar 24 09:04:51 1999
@@ -492,7 +492,7 @@
     t = rthingy(args[1]);
     cw = t->widget;
     unrefthingy(t);
-    if (!(cw->flags & ZLE_ISCOMP)) {
+    if (!cw || !(cw->flags & ZLE_ISCOMP)) {
 	zerrnam(name, "invalid widget `%s'", args[1], 0);
 	return 1;
     }

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author