From d4d92a759e78355fbf2301fa6a3c903c9d59996e Mon Sep 17 00:00:00 2001 From: Ken Thomases Date: Fri, 10 Jan 2014 03:11:31 -0600 Subject: [PATCH] winemac: Clear the latentDisplayModes instance variable before realizing the latent modes. --- dlls/winemac.drv/cocoa_app.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m index 3e622b70206..13d9c87c573 100644 --- a/dlls/winemac.drv/cocoa_app.m +++ b/dlls/winemac.drv/cocoa_app.m @@ -2080,13 +2080,14 @@ int macdrv_err_on; - (void)applicationDidBecomeActive:(NSNotification *)notification { 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]]; } - [latentDisplayModes removeAllObjects]; [self updateCursorClippingState]; -- 2.11.4.GIT