mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-20 18:26:23 +00:00
Protect against [window screen] returning nil.
This commit is contained in:
parent
020d3fa183
commit
e3d51643ca
3 changed files with 20 additions and 3 deletions
|
@ -389,7 +389,9 @@ has blocked and waited for events.
|
|||
*/
|
||||
- (NSScreen *) _screenForFrame: (NSRect)frame
|
||||
{
|
||||
CGFloat largest = 0.0;
|
||||
// FIXME: We always return the first screen, if there is no overlap.
|
||||
// Other code relies on [window screen] not returning nil.
|
||||
CGFloat largest = -1.0;
|
||||
NSArray *screens = [NSScreen screens];
|
||||
NSInteger index = 0;
|
||||
NSScreen *theScreen = nil;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue