diff options
author | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2016-02-05 21:39:20 +0100 |
---|---|---|
committer | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2016-02-05 21:39:20 +0100 |
commit | 086046990012b9634848e6a5018f56c8d11ff9bd (patch) | |
tree | a8a5cbae84658d6193a5b6cf68708dc9e1879d7b /src | |
parent | af229a8bb76d3dc964be2bbab3db75d6a9225532 (diff) | |
parent | 7674fd5936de3190f1fd3bba3ef82370a2941064 (diff) | |
download | irssi-086046990012b9634848e6a5018f56c8d11ff9bd.zip |
Merge pull request #413 from dequis/completion-list-crash-fix
completion: Fix crash when the complist provided by a script has nulls
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-common/core/completion.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fe-common/core/completion.c b/src/fe-common/core/completion.c index a4715d23..1e7833a4 100644 --- a/src/fe-common/core/completion.c +++ b/src/fe-common/core/completion.c @@ -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); |