From 68c8c60eaab795353e30218a4c41615328697256 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Sat, 30 Oct 2021 23:33:44 +0200 Subject: 49533: add null check for preprompt functions list that could occur following an error when loading a module --- Src/utils.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Src/utils.c') diff --git a/Src/utils.c b/Src/utils.c index a74c8bd2c..ed3690172 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -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) { -- cgit 1.4.1