Tag: check bulk mode in Clear()

This commit is contained in:
Max Kellermann 2013-07-31 09:02:07 +02:00
parent 8b2dcf7018
commit ba79f4c1f9
1 changed files with 8 additions and 1 deletions

View File

@ -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;
}