diff options
author | Timo Sirainen <cras@irssi.org> | 2001-11-20 03:26:36 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-11-20 03:26:36 +0000 |
commit | 53ce47a81ac0bfc84f27f06a5d2d161e06bfe6d8 (patch) | |
tree | 3b50ca6e29eb130de90806e9c2c7989cb4cd3a98 /src/irc | |
parent | 72d943acdbdcc83082a7316aa60170724aef5c79 (diff) | |
download | irssi-53ce47a81ac0bfc84f27f06a5d2d161e06bfe6d8.zip |
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
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/core/irc.c | 5 |
1 files changed, 5 insertions, 0 deletions
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); |