hirc

IRC client
Log | Files | Refs

commit ab466944611643d7ad715ae52507e2963dd65cd2
parent 2f7556bcb5859eaf79cb0cd48d955ee5c9b7ca25
Author: hhvn <dev@hhvn.uk>
Date:   Fri, 12 Nov 2021 23:36:55 +0000

main.c: safe ircprintf

Diffstat:
Mmain.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/main.c b/main.c @@ -124,8 +124,8 @@ ircprintf(struct Server *server, char *format, ...) { va_list ap; int ret, serrno; - if (server->status == ConnStatus_notconnected) { - ui_error("Not connected to server '%s'", server->name); + if (!server || server->status == ConnStatus_notconnected) { + ui_error("Not connected to server '%s'", server ? server->name : ""); return -1; }