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,6 +2790,7 @@ LRESULT CALLBACK windowEnumCallback(HWND hwnd, LPARAM lParam)
NSImage *cursorImage = [[NSCursor currentCursor] image]; NSImage *cursorImage = [[NSCursor currentCursor] image];
// has the cursor already failed? // has the cursor already failed?
if (cursorImage != nil) {
for (NSImage *item in listOfCursorsFailed) { for (NSImage *item in listOfCursorsFailed) {
if (cursorImage == item) { if (cursorImage == item) {
cursorFound = TRUE; cursorFound = TRUE;
@ -2801,6 +2802,7 @@ LRESULT CALLBACK windowEnumCallback(HWND hwnd, LPARAM lParam)
if (!cursorFound) { if (!cursorFound) {
[listOfCursorsFailed addObject:cursorImage]; [listOfCursorsFailed addObject:cursorImage];
NSLog(@"GetCursorInfo failed with %d", GetLastError()); NSLog(@"GetCursorInfo failed with %d", GetLastError());
}
} }
} }
return NSZeroPoint; return NSZeroPoint;