summaryrefslogtreecommitdiff
path: root/src/plugins/irc
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/irc')
-rw-r--r--src/plugins/irc/irc-message.c3
-rw-r--r--src/plugins/irc/irc-protocol.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/irc/irc-message.c b/src/plugins/irc/irc-message.c
index 8899bee53..afa999281 100644
--- a/src/plugins/irc/irc-message.c
+++ b/src/plugins/irc/irc-message.c
@@ -495,6 +495,9 @@ irc_message_get_address_from_host (const char *host)
char host2[256], *pos_space, *pos;
const char *ptr_host;
+ if (!host)
+ return NULL;
+
address[0] = '\0';
if (host)
{
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index a68534cbc..b869e59d6 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -914,7 +914,7 @@ IRC_PROTOCOL_CALLBACK(chghost)
nick,
IRC_COLOR_CHAT_DELIMITERS,
IRC_COLOR_CHAT_HOST,
- address,
+ (address) ? address : "",
IRC_COLOR_CHAT_DELIMITERS,
IRC_COLOR_MESSAGE_CHGHOST,
IRC_COLOR_CHAT_HOST,