aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-11-10 04:21:24 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-11-10 04:21:24 +0000
commit8bba38177e4e85b9b6f2f48f826b6e829dceb11a (patch)
tree7a34d71054f9299f25c42a0dcfbc751e1cd36d38
parent8a38ac9446887f9e05f6c514cee4477ad3e50088 (diff)
downloadmpd-8bba38177e4e85b9b6f2f48f826b6e829dceb11a.tar.gz
mpd-8bba38177e4e85b9b6f2f48f826b6e829dceb11a.tar.xz
mpd-8bba38177e4e85b9b6f2f48f826b6e829dceb11a.zip
a tiny assert added
git-svn-id: https://svn.musicpd.org/mpd/branches/r2562-metadata-handling-rewrite@2572 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-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);