diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2006-11-11 00:38:25 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2006-11-11 00:38:25 +0000 |
commit | 5a915f6974fabf55fa049feab728d418bdf51e8f (patch) | |
tree | b71e12ee1dfd2f680a4f3c043f35f317e9dfbb41 /src | |
parent | 6729d8d6f2b9bf48238580484a2e5a93d856323c (diff) | |
download | weechat-5a915f6974fabf55fa049feab728d418bdf51e8f.zip |
Fixed random crash with completion
Diffstat (limited to 'src')
-rw-r--r-- | src/common/completion.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/common/completion.c b/src/common/completion.c index 58818c6ed..fd9cee347 100644 --- a/src/common/completion.c +++ b/src/common/completion.c @@ -54,10 +54,8 @@ void completion_init (t_completion *completion, void *server, void *channel) { - if (server) - completion->server = server; - if (channel) - completion->channel = channel; + completion->server = server; + completion->channel = channel; completion->context = COMPLETION_NULL; completion->base_command = NULL; completion->base_command_arg = 0; @@ -964,7 +962,7 @@ completion_find_context (t_completion *completion, char *buffer, int size, int p /* look for context */ completion_free (completion); - completion_init (completion, NULL, NULL); + completion_init (completion, completion->server, completion->channel); command = ((buffer[0] == '/') && (buffer[1] != '/')) ? 1 : 0; command_arg = 0; i = 0; |