summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/irc/irc-completion.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/plugins/irc/irc-completion.c b/src/plugins/irc/irc-completion.c
index 684a78ed7..d13de4638 100644
--- a/src/plugins/irc/irc-completion.c
+++ b/src/plugins/irc/irc-completion.c
@@ -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;