mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-11-27 02:50:57 +01:00
49533: add null check for preprompt functions list that could occur following an error when loading a module
This commit is contained in:
parent
632fee7cdf
commit
68c8c60eaa
2 changed files with 6 additions and 0 deletions
|
|
@ -1,5 +1,8 @@
|
||||||
2021-10-30 Oliver Kiddle <opk@zsh.org>
|
2021-10-30 Oliver Kiddle <opk@zsh.org>
|
||||||
|
|
||||||
|
* 49533: Src/utils.c: add null check for preprompt functions list
|
||||||
|
that could occur following an error when loading a module
|
||||||
|
|
||||||
* 49528: Src/Zle/comp.h, Src/Zle/compcore.c, Src/Zle/complete.c,
|
* 49528: Src/Zle/comp.h, Src/Zle/compcore.c, Src/Zle/complete.c,
|
||||||
Completion/X/Command/_xinput, Completion/Zsh/Command/_compadd,
|
Completion/X/Command/_xinput, Completion/Zsh/Command/_compadd,
|
||||||
Doc/Zsh/compwid.yo: allow multiple -D options to compadd
|
Doc/Zsh/compwid.yo: allow multiple -D options to compadd
|
||||||
|
|
|
||||||
|
|
@ -1378,6 +1378,9 @@ delprepromptfn(voidvoidfnptr_t func)
|
||||||
{
|
{
|
||||||
LinkNode ln;
|
LinkNode ln;
|
||||||
|
|
||||||
|
if (!prepromptfns)
|
||||||
|
return;
|
||||||
|
|
||||||
for (ln = firstnode(prepromptfns); ln; ln = nextnode(ln)) {
|
for (ln = firstnode(prepromptfns); ln; ln = nextnode(ln)) {
|
||||||
Prepromptfn ppdat = (Prepromptfn)getdata(ln);
|
Prepromptfn ppdat = (Prepromptfn)getdata(ln);
|
||||||
if (ppdat->func == func) {
|
if (ppdat->func == func) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue