- node_t *item = find_pred(&pred, list, key, TRUE);
- if (item->key != key) {
- TRACE("l3", "list_remove: remove failed, an item with a matching key does not exist in the list", 0, 0);
+ node_t *item = find_pred(&pred, ll, key, TRUE);
+ if (item == NULL || item->key != key) {
+ TRACE("l3", "ll_remove: remove failed, an item with a matching key does not exist in the ll", 0, 0);