diff options
author | waker <wakeroid@gmail.com> | 2011-05-22 11:47:12 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-05-22 11:47:12 +0200 |
commit | 89746d84af75e6454e647385856a8cf103da0321 (patch) | |
tree | c269532e90c7f4cce4b2ee6540b6f98639bb63ea /plugins | |
parent | aeef33484100c71454cdcd1331b49ac1ee344ade (diff) |
added null-ptr checks to artwork queue_pop
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/artwork/artwork.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/plugins/artwork/artwork.c b/plugins/artwork/artwork.c index 3b2663d1..c2a8b766 100644 --- a/plugins/artwork/artwork.c +++ b/plugins/artwork/artwork.c @@ -141,10 +141,18 @@ void queue_pop (void) { deadbeef->mutex_lock (mutex); cover_query_t *next = queue ? queue->next : NULL; - free (queue->fname); - free (queue->artist); - free (queue->album); - free (queue); + if (queue) { + if (queue->fname) { + free (queue->fname); + } + if (queue->artist) { + free (queue->artist); + } + if (queue->album) { + free (queue->album); + } + free (queue); + } queue = next; if (!queue) { queue_tail = NULL; |