Check for NULL inside autocomplete_free

This commit is contained in:
James Booth
2014-09-26 00:48:48 +01:00
parent ccbaa67a01
commit a4f7932ed7
4 changed files with 7 additions and 11 deletions

View File

@@ -80,8 +80,10 @@ autocomplete_reset(Autocomplete ac)
void
autocomplete_free(Autocomplete ac)
{
autocomplete_clear(ac);
free(ac);
if (ac) {
autocomplete_clear(ac);
free(ac);
}
}
gint