From 43fe81e114e9fab747fc15a2e5683dc3d1d9f94b Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Thu, 22 Jan 2009 10:14:33 +0100 Subject: [PATCH] add null pointer check to backlog_lines In some configuration backlog_lines can return NULL --- src/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/log.c b/src/log.c index fcc1856..65e08e7 100644 --- a/src/log.c +++ b/src/log.c @@ -1318,7 +1318,7 @@ list_t *backlog_lines(log_t *log, const char *bl, const char *cli_nick, _irc_line_append(&l, "PRIVMSG"); _irc_line_append(&l, dest); _irc_line_append(&l, "End of backlog"); - list_add_last(ret, irc_line_to_string(&l)); + if (ret) list_add_last(ret, irc_line_to_string(&l)); _irc_line_deinit(&l); } }