1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-25 14:20:53 +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:
Oliver Kiddle 2021-10-30 23:33:44 +02:00
parent 632fee7cdf
commit 68c8c60eaa
2 changed files with 6 additions and 0 deletions

View file

@ -1378,6 +1378,9 @@ delprepromptfn(voidvoidfnptr_t func)
{
LinkNode ln;
if (!prepromptfns)
return;
for (ln = firstnode(prepromptfns); ln; ln = nextnode(ln)) {
Prepromptfn ppdat = (Prepromptfn)getdata(ln);
if (ppdat->func == func) {