From 17de8ec2148bed65b7c2e73bff49830ed8050e49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sat, 19 Nov 2005 16:19:45 +0000 Subject: [PATCH] GetToken() is supposed to always set the _option argument - not only on success. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15032 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/app/TokenSpace.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/kits/app/TokenSpace.cpp b/src/kits/app/TokenSpace.cpp index d542dc49a8..f2f5e785aa 100644 --- a/src/kits/app/TokenSpace.cpp +++ b/src/kits/app/TokenSpace.cpp @@ -92,8 +92,10 @@ BTokenSpace::GetToken(int32 token, int16 type, void** _object, { BAutolock locker(const_cast(*this)); - if (token < 1) + if (token < 1) { + *_object = NULL; return B_ENTRY_NOT_FOUND; + } TokenMap::const_iterator iterator = fTokenMap.find(token);