winemac: Clear the latentDisplayModes instance variable before realizing the latent modes.

This commit is contained in:
Ken Thomases 2014-01-10 03:11:31 -06:00 committed by Alexandre Julliard
parent 42a7d7209b
commit d4d92a759e

View File

@ -2080,13 +2080,14 @@ int macdrv_err_on;
- (void)applicationDidBecomeActive:(NSNotification *)notification - (void)applicationDidBecomeActive:(NSNotification *)notification
{ {
NSNumber* displayID; NSNumber* displayID;
NSDictionary* modesToRealize = [latentDisplayModes autorelease];
for (displayID in latentDisplayModes) latentDisplayModes = [[NSMutableDictionary alloc] init];
for (displayID in modesToRealize)
{ {
CGDisplayModeRef mode = (CGDisplayModeRef)[latentDisplayModes objectForKey:displayID]; CGDisplayModeRef mode = (CGDisplayModeRef)[modesToRealize objectForKey:displayID];
[self setMode:mode forDisplay:[displayID unsignedIntValue]]; [self setMode:mode forDisplay:[displayID unsignedIntValue]];
} }
[latentDisplayModes removeAllObjects];
[self updateCursorClippingState]; [self updateCursorClippingState];