forgot I made this change... added locking to
the lookup of a cursor git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16842 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
8e56a3ff2e
commit
d7e9392e25
@ -418,11 +418,16 @@ CursorManager::SetDefaults()
|
|||||||
ServerCursor *
|
ServerCursor *
|
||||||
CursorManager::FindCursor(int32 token)
|
CursorManager::FindCursor(int32 token)
|
||||||
{
|
{
|
||||||
ServerCursor* cursor;
|
if (!Lock())
|
||||||
if (fTokenSpace.GetToken(token, kCursorToken, (void**)&cursor) == B_OK)
|
return NULL;
|
||||||
return cursor;
|
|
||||||
|
|
||||||
return NULL;
|
ServerCursor* cursor;
|
||||||
|
if (fTokenSpace.GetToken(token, kCursorToken, (void**)&cursor) != B_OK)
|
||||||
|
cursor = NULL;
|
||||||
|
|
||||||
|
Unlock();
|
||||||
|
|
||||||
|
return cursor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -435,6 +440,7 @@ CursorManager::_FindCursor(team_id clientTeam, const uint8* cursorData)
|
|||||||
if (cursor->OwningTeam() == clientTeam
|
if (cursor->OwningTeam() == clientTeam
|
||||||
&& cursor->CursorData()
|
&& cursor->CursorData()
|
||||||
&& memcmp(cursor->CursorData(), cursorData, 68) == 0) {
|
&& memcmp(cursor->CursorData(), cursorData, 68) == 0) {
|
||||||
|
//printf("found already existing cursor\n");
|
||||||
return cursor;
|
return cursor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user