git-svn-id: https://svn.musicpd.org/mpd/trunk@2652 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Warren Dukes 2004-11-14 14:42:07 +00:00
parent bb15d3f29e
commit c2844e84ff
1 changed files with 9 additions and 1 deletions

View File

@ -24,6 +24,8 @@ typedef struct tagTrackerItem {
char * getTagItemString(int type, char * string) {
ListNode * node;
if(type == TAG_ITEM_TITLE) return strdup(string);
if(tagLists[type] == NULL) {
tagLists[type] = makeList(free, 1);
}
@ -50,7 +52,13 @@ void removeTagItemString(int type, char * string) {
if(tagLists[type] == NULL) return;
node = findNodeInList(tagLists[type], string);
assert(node);
/*assert(node);*/
if(!node) {
free(string);
return;
}
if(node) {
TagTrackerItem * item = node->data;
item->count--;