From 06b03d336e7cf0b20633045afc5e89ee28e1560c Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Fri, 12 Feb 2016 04:04:35 +0100 Subject: degesch: fix segfault on sent messages w/o buffer --- degesch.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/degesch.c b/degesch.c index 2f010d2..cdbc473 100644 --- a/degesch.c +++ b/degesch.c @@ -5194,6 +5194,10 @@ irc_get_buffer_for_message (struct server *s, } else if (!buffer) { + // Outgoing messages needn't have a prefix, no buffer associated + if (!msg->prefix) + return NULL; + // Don't make user buffers for servers (they can send NOTICEs) if (!irc_find_userhost (msg->prefix)) return s->buffer; -- cgit v1.2.3-70-g09d2