Commit b5feb899 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

macosx: NSScreen dealloc is not only called at end of execution of course.

This fixes the NSScreen crash, which could be accurately reproduced by following the steps in #2880.
parent 1237bcf2
......@@ -129,13 +129,14 @@ static NSMutableArray *blackoutWindows = NULL;
+ (void)load
{
/* init our fake object attribute */
blackoutWindows = [[NSMutableArray alloc] initWithCapacity:1];
if( !blackoutWindows )
blackoutWindows = [NSMutableArray arrayWithCapacity:1];
}
- (void)dealloc
{
[blackoutWindows makeObjectsPerformSelector:@selector(close)];
[blackoutWindows removeAllObjects];
[blackoutWindows release];
[super dealloc];
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment