diff options
author | Max Kellermann <max@duempel.org> | 2013-07-31 09:02:07 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-07-31 09:02:07 +0200 |
commit | ba79f4c1f9b9868db04ece3c8870085a25915556 (patch) | |
tree | 12f5d1f1e59efdb0d38f1bde015560177181da06 /src | |
parent | 8b2dcf7018bc2467a753fdf187ac8961124d5206 (diff) | |
download | mpd-ba79f4c1f9b9868db04ece3c8870085a25915556.tar.gz mpd-ba79f4c1f9b9868db04ece3c8870085a25915556.tar.xz mpd-ba79f4c1f9b9868db04ece3c8870085a25915556.zip |
Tag: check bulk mode in Clear()
Diffstat (limited to 'src')
-rw-r--r-- | src/Tag.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Tag.cxx b/src/Tag.cxx index 7853f0a2f..39560d49d 100644 --- a/src/Tag.cxx +++ b/src/Tag.cxx @@ -143,7 +143,14 @@ Tag::Clear() tag_pool_put_item(items[i]); tag_pool_lock.unlock(); - g_free(items); + if (items == bulk.items) { +#ifndef NDEBUG + assert(bulk.busy); + bulk.busy = false; +#endif + } else + g_free(items); + items = nullptr; num_items = 0; } |