diff options
author | Timo Sirainen <cras@irssi.org> | 2000-09-25 13:23:01 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-09-25 13:23:01 +0000 |
commit | bb20de0d4354d6f53ce1c132f7d073ee896b15fe (patch) | |
tree | e5b74b2eb01fa5242d8ce30646eaa9f8ad797e3b /src | |
parent | cb9c32d9815b374da82e4ac429c5b6e50fd54bbb (diff) | |
download | irssi-bb20de0d4354d6f53ce1c132f7d073ee896b15fe.zip |
If /SET show_quit_once was set and ignored nick quitted, irssi printed
GLib warning.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@666 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-common/irc/fe-events.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fe-common/irc/fe-events.c b/src/fe-common/irc/fe-events.c index f6c85961..d317f5a9 100644 --- a/src/fe-common/irc/fe-events.c +++ b/src/fe-common/irc/fe-events.c @@ -275,13 +275,14 @@ static void event_quit(const char *data, IRC_SERVER_REC *server, const char *nic } g_slist_free(windows); - if (once) { + if (once && count > 0) { g_string_truncate(chans, chans->len-1); printformat(server, print_channel, MSGLEVEL_QUITS, - count <= 1 ? IRCTXT_QUIT : IRCTXT_QUIT_ONCE, + count == 1 ? IRCTXT_QUIT : IRCTXT_QUIT_ONCE, nick, addr, data, chans->str); - g_string_free(chans, TRUE); } + if (chans != NULL) + g_string_free(chans, TRUE); } static void event_kick(const char *data, IRC_SERVER_REC *server, const char *kicker, const char *addr) |