aboutsummaryrefslogtreecommitdiffstats
path: root/src/tagTracker.c
diff options
context:
space:
mode:
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--;