1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-03 08:13:14 +02:00

Fixed random crash with completion

This commit is contained in:
Sebastien Helleu
2006-11-11 00:38:25 +00:00
parent 6729d8d6f2
commit 5a915f6974
2 changed files with 6 additions and 10 deletions
+3 -5
View File
@@ -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;
+3 -5
View File
@@ -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;