From 53ce47a81ac0bfc84f27f06a5d2d161e06bfe6d8 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 20 Nov 2001 03:26:36 +0000 Subject: [PATCH] irc_send_cmd_split() - don't crash if there was no nicks given (probably called improperly from script).. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2123 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/irc/core/irc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/irc/core/irc.c b/src/irc/core/irc.c index b3ab9897..d24fb801 100644 --- a/src/irc/core/irc.c +++ b/src/irc/core/irc.c @@ -185,6 +185,11 @@ void irc_send_cmd_split(IRC_SERVER_REC *server, const char *cmd, g_return_if_fail(cmd != NULL); str = split_nicks(cmd, &pre, &nicks, &post, nickarg); + if (nicks == NULL) { + /* no nicks given? */ + g_free(str); + return; + } /* split the nicks */ nickstr = g_string_new(NULL);