Fix attempt to remove nil object from array

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@40402 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2017-03-19 15:01:42 +00:00
parent acd59c14bd
commit b086ff6ebe

View file

@ -2764,9 +2764,13 @@ image.</p><p>See Also: -applicationIconImage</p>
- (NSArray*) windows
{
// Omit the app icon window
NSMutableArray *windows = AUTORELEASE([GSAllWindows() mutableCopy]);
[windows removeObject: [self iconWindow]];
return windows;
if ([self iconWindow])
{
NSMutableArray *windows = AUTORELEASE([GSAllWindows() mutableCopy]);
[windows removeObject: [self iconWindow]];
return windows;
}
return GSAllWindows();
}
/**