summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2017-06-18 06:31:34 -0400
committerPatrick Griffis <tingping@tingping.se>2017-06-18 06:31:34 -0400
commit2d184c09674b417bf294001d017b0d1ad2337de3 (patch)
tree52820b602509dd5990ad345241cf0af1cc476ee6 /src/common
parentce91bebc39a649511bf85ee75b5323bbdfa55655 (diff)
Fix crash on coloring NULL nicks
Fixes #2014
Diffstat (limited to 'src/common')
-rw-r--r--src/common/text.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/text.c b/src/common/text.c
index eac31ba3..2677ebc4 100644
--- a/src/common/text.c
+++ b/src/common/text.c
@@ -2013,7 +2013,7 @@ text_emit (int index, session *sess, char *a, char *b, char *c, char *d,
 	unsigned int stripcolor_args = (chanopt_is_set (prefs.hex_text_stripcolor_msg, sess->text_strip) ? 0xFFFFFFFF : 0);
 	char tbuf[NICKLEN + 4];
 
-	if (prefs.hex_text_color_nicks && (index == XP_TE_CHANACTION || index == XP_TE_CHANMSG))
+	if (a != NULL && prefs.hex_text_color_nicks && (index == XP_TE_CHANACTION || index == XP_TE_CHANMSG))
 	{
 		g_snprintf (tbuf, sizeof (tbuf), "\003%d%s", text_color_of (a), a);
 		a = tbuf;