Fix minor oversight in previous commit.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42074 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent 2011-06-09 19:32:14 +00:00
parent 930a139d70
commit 87aa57e88e

View File

@ -247,8 +247,10 @@ BMessenger::LockTargetWithTimeout(bigtime_t timeout) const
if (error == B_OK)
error = looper->LockWithTimeout(timeout);
if (error == B_OK && looper->fMsgPort != fPort)
if (error == B_OK && looper->fMsgPort != fPort) {
looper->Unlock();
return B_BAD_PORT_ID;
}
return error;
}