DatabaseCommands: fix crash on "list base"

The string "base" is understood by locate_parse_type(), but not by
listAllUniqueTags().  The special tag type LOCATE_TAG_BASE_TYPE causes
a crash in PrintUniqueTag().
This commit is contained in:
Max Kellermann
2014-04-24 08:13:20 +02:00
parent 1d1f8be260
commit c9aec3e866
2 changed files with 4 additions and 7 deletions

View File

@@ -261,6 +261,8 @@ listAllUniqueTags(Client &client, unsigned type,
std::ref(client), _1);
return db->Visit(selection, f, error);
} else {
assert(type < TAG_NUM_OF_ITEM_TYPES);
using namespace std::placeholders;
const auto f = std::bind(PrintUniqueTag, std::ref(client),
(TagType)type, _1);