aboutsummaryrefslogtreecommitdiffstats
path: root/src/tagTracker.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tagTracker.c')
-rw-r--r--src/tagTracker.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tagTracker.c b/src/tagTracker.c
index ef95ea47a..7bca526a7 100644
--- a/src/tagTracker.c
+++ b/src/tagTracker.c
@@ -2,6 +2,8 @@
#include "list.h"
+#include <assert.h>
+
static List * tagLists[TAG_NUM_OF_ITEM_TYPES] =
{
NULL,
@@ -37,7 +39,9 @@ void removeTagItemString(int type, char * string) {
if(tagLists[type] == NULL) return;
- if((node = findNodeInList(tagLists[type], string))) {
+ node = findNodeInList(tagLists[type], string);
+ assert(node);
+ if(node) {
int * countPtr = node->data;
*countPtr--;
if(*countPtr <= 0) deleteNodeFromList(tagLists[type], node);