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

@@ -77,9 +77,7 @@ bookmark_request(void)
id = strdup("bookmark_init_request");
autojoin_count = 0;
if (bookmark_ac != NULL) {
autocomplete_free(bookmark_ac);
}
autocomplete_free(bookmark_ac);
bookmark_ac = autocomplete_new();
if (bookmark_list != NULL) {
g_list_free_full(bookmark_list, _bookmark_item_destroy);