diff options
author | Wouter Coekaerts <coekie@irssi.org> | 2010-02-27 18:52:41 +0000 |
---|---|---|
committer | coekie <coekie@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2010-02-27 18:52:41 +0000 |
commit | 4b751d9df66829622c8e0d4c827cfaa2ff317c10 (patch) | |
tree | a4f904601713cff58064c54703b05a36e3d78be1 /src | |
parent | 3eea03ccb81578fac0cb677d419c8176c5e30078 (diff) | |
download | irssi-4b751d9df66829622c8e0d4c827cfaa2ff317c10.zip |
Use servertag from the active DCC chat when not connected anymore to the IRC server that started it. This fixes a crash with handling the DCC queue. Reported by Aurelien Delaitre (SATE 2009)
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5122 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r-- | src/irc/dcc/dcc-send.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/irc/dcc/dcc-send.c b/src/irc/dcc/dcc-send.c index 9b5d1189..78ccf01d 100644 --- a/src/irc/dcc/dcc-send.c +++ b/src/irc/dcc/dcc-send.c @@ -183,10 +183,12 @@ static void cmd_dcc_send(const char *data, IRC_SERVER_REC *server, (chat->mirc_ctcp || g_strcasecmp(nick, chat->nick) != 0)) chat = NULL; - if (!IS_IRC_SERVER(server) || !server->connected) - servertag = NULL; - else + if (IS_IRC_SERVER(server) && server->connected) servertag = server->tag; + else if (chat != NULL) + servertag = chat->servertag; + else + servertag = NULL; if (servertag == NULL && chat == NULL) cmd_param_error(CMDERR_NOT_CONNECTED); |