1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

completion: Fix crash when the complist provided by a script has nulls

Can be reproduced with aspell_complete.pl 1.00 by setting an invalid
dictionary with "/set spell_dict a"
This commit is contained in:
dequis 2016-01-29 10:40:18 -03:00
parent 161772892f
commit 7674fd5936

View File

@ -217,6 +217,11 @@ char *word_complete(WINDOW_REC *window, const char *line, int *pos, int erase, i
want_space = TRUE;
signal_emit("complete word", 5, &complist, window, word, linestart, &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);