hirc

IRC client
Log | Files | Refs

commit 2e059c3e7217b8504fdf86f48ccfc4fc0ec3327d
parent 72ad29a760e315f6005a7cfee19affeb12d3be25
Author: hhvn <dev@hhvn.uk>
Date:   Sun, 28 Nov 2021 21:08:03 +0000

serv.c: make support_set null safe

Diffstat:
Mserv.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/serv.c b/serv.c @@ -311,6 +311,9 @@ void support_set(struct Server *server, char *key, char *value) { struct Support *p; + if (!server) + return; + if (!server->supports) { server->supports = malloc(sizeof(struct Support)); server->supports->prev = server->supports->next = NULL;