mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 05:46:38 +02:00
Fix crash when completing /part command on a non-irc buffer (bug #32402)
This commit is contained in:
@@ -550,12 +550,15 @@ irc_completion_msg_part_cb (void *data, const char *completion_item,
|
||||
(void) data;
|
||||
(void) completion_item;
|
||||
|
||||
msg_part = IRC_SERVER_OPTION_STRING(ptr_server,
|
||||
IRC_SERVER_OPTION_DEFAULT_MSG_PART);
|
||||
if (msg_part && msg_part[0])
|
||||
if (ptr_server)
|
||||
{
|
||||
weechat_hook_completion_list_add (completion, msg_part,
|
||||
0, WEECHAT_LIST_POS_SORT);
|
||||
msg_part = IRC_SERVER_OPTION_STRING(ptr_server,
|
||||
IRC_SERVER_OPTION_DEFAULT_MSG_PART);
|
||||
if (msg_part && msg_part[0])
|
||||
{
|
||||
weechat_hook_completion_list_add (completion, msg_part,
|
||||
0, WEECHAT_LIST_POS_SORT);
|
||||
}
|
||||
}
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
|
||||
Reference in New Issue
Block a user