summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-07-10 23:21:04 +0200
committerSebastien Helleu <flashcode@flashtux.org>2011-07-10 23:21:04 +0200
commit201ee104e75e0578c63b27c3a4f4b147924891fc (patch)
treeb0afbae7eb977ba6db13a8b7e17cf1322a4b1539
parentcb4e0d007676df297cd50524292cad4aa0754a8c (diff)
downloadweechat-201ee104e75e0578c63b27c3a4f4b147924891fc.zip
irc: fix crash when /join command is executed on a non-irc buffer (bug #33742)
-rw-r--r--ChangeLog1
-rw-r--r--src/plugins/irc/irc-command.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index cf164f363..d4ed67c02 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -27,6 +27,7 @@ Version 0.3.6 (under dev!)
hdata_get_string
* api: fix bug with function config_set_desc_plugin (use immediately
description for option when function is called)
+* irc: fix crash when /join command is executed on a non-irc buffer (bug #33742)
* irc: fix bug with comma in irc color code: do not strip comma if it is not
followed by a digit (bug #33662)
* irc: add prefix "#" for all channels on join (if no prefix given)
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c
index b9216d9ce..50f95fed1 100644
--- a/src/plugins/irc/irc-command.c
+++ b/src/plugins/irc/irc-command.c
@@ -1868,13 +1868,13 @@ irc_command_join (void *data, struct t_gui_buffer *buffer, int argc,
}
else
{
- if (!ptr_server)
- return WEECHAT_RC_ERROR;
+ IRC_COMMAND_CHECK_SERVER("join", 1);
irc_command_join_server (ptr_server, argv_eol[1], 1);
}
}
else
{
+ IRC_COMMAND_CHECK_SERVER("join", 1);
if (ptr_channel && (ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL)
&& !ptr_channel->nicks)
{