aboutsummaryrefslogtreecommitdiffstats
path: root/src/tagTracker.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-11-14 14:42:07 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-11-14 14:42:07 +0000
commitc2844e84ff6703628120fed1e5a0c479887430c8 (patch)
treefe068d147f6075ada86d60ec32e7475558d8fae4 /src/tagTracker.c
parentbb15d3f29ece93dc5041779f63ec80a1500cc033 (diff)
downloadmpd-c2844e84ff6703628120fed1e5a0c479887430c8.tar.gz
mpd-c2844e84ff6703628120fed1e5a0c479887430c8.tar.xz
mpd-c2844e84ff6703628120fed1e5a0c479887430c8.zip
test
git-svn-id: https://svn.musicpd.org/mpd/trunk@2652 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/tagTracker.c')
-rw-r--r--src/tagTracker.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/tagTracker.c b/src/tagTracker.c
index 977e8746e..c9b083353 100644
--- a/src/tagTracker.c
+++ b/src/tagTracker.c
@@ -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--;