From 201ee104e75e0578c63b27c3a4f4b147924891fc Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sun, 10 Jul 2011 23:21:04 +0200 Subject: irc: fix crash when /join command is executed on a non-irc buffer (bug #33742) --- src/plugins/irc/irc-command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/irc') 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) { -- cgit v1.2.3