diff options
Diffstat (limited to 'src/tools/autocomplete.c')
-rw-r--r-- | src/tools/autocomplete.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tools/autocomplete.c b/src/tools/autocomplete.c index 72abcba4..adac86de 100644 --- a/src/tools/autocomplete.c +++ b/src/tools/autocomplete.c @@ -74,7 +74,13 @@ autocomplete_free(Autocomplete ac) gint autocomplete_length(Autocomplete ac) { - return g_slist_length(ac->items); + if (ac == NULL) { + return 0; + } else if (ac->items == NULL) { + return 0; + } else { + return g_slist_length(ac->items); + } } gboolean |