summaryrefslogtreecommitdiff
path: root/degesch.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2016-02-12 04:04:35 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2016-02-12 04:04:35 +0100
commit06b03d336e7cf0b20633045afc5e89ee28e1560c (patch)
tree1c527726d46a74d8abe6dc1e86ef8a67d2b9b20c /degesch.c
parent11519ee86087619b13d1686bcc4a456b085c4da4 (diff)
downloadxK-06b03d336e7cf0b20633045afc5e89ee28e1560c.tar.gz
xK-06b03d336e7cf0b20633045afc5e89ee28e1560c.tar.xz
xK-06b03d336e7cf0b20633045afc5e89ee28e1560c.zip
degesch: fix segfault on sent messages w/o buffer
Diffstat (limited to 'degesch.c')
-rw-r--r--degesch.c4
1 files changed, 4 insertions, 0 deletions
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;