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:
parent
a84bd95ff7
commit
f4b64fa6c8
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user