GetToken() did not check for the correct token type.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13443 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-07-05 14:46:59 +00:00
parent a84bd95ff7
commit f4b64fa6c8

View File

@ -100,7 +100,7 @@ BTokenSpace::GetToken(int32 token, int16 type, void** object,
BAutolock Locker(const_cast<BLocker&>(fLocker));
TTokenMap::const_iterator iter = fTokenMap.find(token);
if (iter == fTokenMap.end()) {
if (iter == fTokenMap.end() || iter->second.type != type) {
*object = NULL;
return B_ERROR;
}