Don't check nil cursor image for log and/or adding to array

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@40059 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2016-08-10 19:13:35 +00:00
parent cec559f512
commit da5ff641d3

View file

@ -2790,18 +2790,20 @@ LRESULT CALLBACK windowEnumCallback(HWND hwnd, LPARAM lParam)
NSImage *cursorImage = [[NSCursor currentCursor] image];
// has the cursor already failed?
for (NSImage *item in listOfCursorsFailed) {
if (cursorImage == item) {
cursorFound = TRUE;
break;
}
}
// log this cursor fail entry to avoid multiple logs
if (!cursorFound) {
[listOfCursorsFailed addObject:cursorImage];
NSLog(@"GetCursorInfo failed with %d", GetLastError());
}
if (cursorImage != nil) {
for (NSImage *item in listOfCursorsFailed) {
if (cursorImage == item) {
cursorFound = TRUE;
break;
}
}
// log this cursor fail entry to avoid multiple logs
if (!cursorFound) {
[listOfCursorsFailed addObject:cursorImage];
NSLog(@"GetCursorInfo failed with %d", GetLastError());
}
}
}
return NSZeroPoint;
}