Fix an under-retention crash: Use retain + autorelease to prolong the life of this bridge, so that a coalescing display doesn't message a dead bridge object in the following compound statement.
authorPeter Hosey <hg@boredzo.org>
Mon May 24 04:38:21 2010 -0700 (2010-05-24)
changeset 4622693159a5f0e8
parent 4621 507967d00c44
child 4623 5f522737a563
Fix an under-retention crash: Use retain + autorelease to prolong the life of this bridge, so that a coalescing display doesn't message a dead bridge object in the following compound statement.
Plugins/Displays/GrowlDisplayPlugin.m
     1.1 --- a/Plugins/Displays/GrowlDisplayPlugin.m	Mon May 24 04:22:17 2010 -0700
     1.2 +++ b/Plugins/Displays/GrowlDisplayPlugin.m	Mon May 24 04:38:21 2010 -0700
     1.3 @@ -158,7 +158,8 @@
     1.4  			bridge = nil;
     1.5  		}
     1.6  	} else {
     1.7 -		theBridge = [activeBridges bridgeForWindowController:wc];
     1.8 +		//Keep the bridge alive for the life of this pool, in case it would otherwise die here before we ask it for its notification's coalescing identifier in the next compound statement.
     1.9 +		theBridge = [[[wc bridge] retain] autorelease];
    1.10  		[theBridge removeWindowController:wc];
    1.11  		[activeBridges removeObjectIdenticalTo:theBridge];
    1.12  	}