Don't crash if alt-y is typed twice in a row without a prior ctrl-y.

This commit is contained in:
Wayne Davison 2003-07-29 09:53:26 +00:00
parent 0f080f741c
commit 1495a7e008

View file

@ -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