From 1495a7e008a8f7b80df2a2ce8319710a182e4bd5 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Tue, 29 Jul 2003 09:53:26 +0000 Subject: Don't crash if alt-y is typed twice in a row without a prior ctrl-y. --- Src/Zle/zle_misc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c index 4a5c6c5c2..89c8b8229 100644 --- a/Src/Zle/zle_misc.c +++ b/Src/Zle/zle_misc.c @@ -372,8 +372,10 @@ yankpop(char **args) int cc, kctstart = kct; Cutbuffer buf; - if (!(lastcmd & ZLE_YANK) || !kring) + if (!(lastcmd & ZLE_YANK) || !kring || !kctbuf) { + kctbuf = NULL; return 1; + } do { /* * This is supposed to make the yankpop loop -- cgit 1.4.1