summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-02-10 09:52:15 +0100
committerSebastien Helleu <flashcode@flashtux.org>2011-02-10 09:52:15 +0100
commit7d79757d85655556eb1be3be6b2b5949f2bbfce3 (patch)
tree7406dee7409cbbd928eeb004c51b19cae5493791
parentd8248f3f688fe0d5e467762d1a5c32acacd5d443 (diff)
downloadweechat-7d79757d85655556eb1be3be6b2b5949f2bbfce3.zip
Fix crash when completing /part command on a non-irc buffer (bug #32402)
-rw-r--r--ChangeLog3
-rw-r--r--src/plugins/irc/irc-completion.c13
2 files changed, 10 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 2cf91ce2f..bed3984ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
-v0.3.5-dev, 2011-02-07
+v0.3.5-dev, 2011-02-10
Version 0.3.5 (under dev!)
@@ -18,6 +18,7 @@ Version 0.3.5 (under dev!)
* core: dynamically allocate color pairs (extended colors can be used without
being added with command "/color")
* core: allow background for nick colors (using "/")
+* irc: fix crash when completing /part command on a non-irc buffer (bug #32402)
* irc: add many missing commands for target buffer (options irc.msgbuffer.xxx)
(bug #32216)
* lua: fix crash when many scripts are executing callbacks at same time
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;