Fixed potential segfaults on autocomplete

This commit is contained in:
James Booth
2014-05-08 20:49:41 +01:00
parent dfb1e1c4a2
commit a519d25e4b

View File

@@ -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;