diff options
author | James Booth <boothj5@gmail.com> | 2014-09-14 22:31:27 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-09-14 22:31:27 +0100 |
commit | b934ad54d53a9108499829924af9292e182c39d9 (patch) | |
tree | 684657941c80c781f40975d59bafc16bb5f0cacf /src/tools | |
parent | de0ce0b80daad482e7f7791887ce810307f9a477 (diff) | |
download | profani-tty-b934ad54d53a9108499829924af9292e182c39d9.tar.gz |
Added form tests
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/autocomplete.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/tools/autocomplete.c b/src/tools/autocomplete.c index 3361c10b..efff6ee0 100644 --- a/src/tools/autocomplete.c +++ b/src/tools/autocomplete.c @@ -62,10 +62,12 @@ autocomplete_new(void) void autocomplete_clear(Autocomplete ac) { - g_slist_free_full(ac->items, free); - ac->items = NULL; + if (ac != NULL) { + g_slist_free_full(ac->items, free); + ac->items = NULL; - autocomplete_reset(ac); + autocomplete_reset(ac); + } } void @@ -335,4 +337,4 @@ _search_from(Autocomplete ac, GSList *curr, gboolean quote) } return NULL; -} \ No newline at end of file +} |