forked from PsychoticNinja/irssi
Merge pull request #413 from dequis/completion-list-crash-fix
completion: Fix crash when the complist provided by a script has nulls
This commit is contained in:
commit
0860469900
@ -217,6 +217,11 @@ char *word_complete(WINDOW_REC *window, const char *line, int *pos, int erase, i
|
|||||||
want_space = TRUE;
|
want_space = TRUE;
|
||||||
signal_emit("complete word", 5, &complist, window, word, linestart, &want_space);
|
signal_emit("complete word", 5, &complist, window, word, linestart, &want_space);
|
||||||
last_want_space = want_space;
|
last_want_space = want_space;
|
||||||
|
|
||||||
|
if (complist != NULL) {
|
||||||
|
/* Remove all nulls (from the signal) before doing further processing */
|
||||||
|
complist = g_list_remove_all(g_list_first(complist), NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free(linestart);
|
g_free(linestart);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user