summaryrefslogtreecommitdiff
path: root/src/plugins/irc
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-06-14 14:34:45 +0200
committerSebastien Helleu <flashcode@flashtux.org>2011-06-14 14:34:45 +0200
commit478c6f73a4a95165cb5529e008bbf10e87ff905c (patch)
tree873679e0b49b063649db2a47c7e8a17f56c86b12 /src/plugins/irc
parent8046d91f5c00e13ac5e2c979d9b723fb703c1f0f (diff)
downloadweechat-478c6f73a4a95165cb5529e008bbf10e87ff905c.zip
irc, relay: check that prefix and message are not NULL before adding a message to raw buffer
Diffstat (limited to 'src/plugins/irc')
-rw-r--r--src/plugins/irc/irc-raw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-raw.c b/src/plugins/irc/irc-raw.c
index 31af8efbd..01cb97d93 100644
--- a/src/plugins/irc/irc-raw.c
+++ b/src/plugins/irc/irc-raw.c
@@ -182,6 +182,9 @@ irc_raw_message_add_to_list (time_t date, const char *prefix,
{
struct t_irc_raw_message *new_raw_message;
+ if (!prefix || !message)
+ return NULL;
+
irc_raw_message_remove_old ();
new_raw_message = malloc (sizeof (*new_raw_message));