diff options
author | James Booth <boothj5@gmail.com> | 2014-05-08 20:49:41 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-05-08 20:49:41 +0100 |
commit | a519d25e4bc7eeca1c53ba3200157ae69003f30a (patch) | |
tree | 30d172a59cafcc7194a347eea9910661fda303a7 | |
parent | dfb1e1c4a26c2b04d6a8b679dde1a95408e816a2 (diff) | |
download | profani-tty-a519d25e4bc7eeca1c53ba3200157ae69003f30a.tar.gz |
Fixed potential segfaults on autocomplete
-rw-r--r-- | src/tools/autocomplete.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tools/autocomplete.c b/src/tools/autocomplete.c index 979b6c86..f6d57e23 100644 --- a/src/tools/autocomplete.c +++ b/src/tools/autocomplete.c @@ -152,6 +152,10 @@ autocomplete_complete(Autocomplete ac, gchar *search_str) { gchar *found = NULL; + // no autocomplete to search + if (ac == NULL) + return NULL; + // no items to search if (!ac->items) return NULL; |