1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-03 13:03:50 +00:00

avoid unneeded retain/release in badger

This commit is contained in:
Mitchell Livingston 2007-05-23 16:22:22 +00:00
parent 787e17135a
commit 544c0c1dc4

View file

@ -174,10 +174,9 @@
//update dock badge
if (baseChange || fSpeedBadge || speedChange)
{
if (!dockIcon)
dockIcon = [fDockIcon retain];
[NSApp setApplicationIconImage: dockIcon];
[dockIcon release];
[NSApp setApplicationIconImage: dockIcon ? dockIcon : fDockIcon];
if (dockIcon)
[dockIcon release];
fSpeedBadge = speedChange;
}
@ -202,6 +201,7 @@
{
fCompleted = 0;
fCompletedBadged = 0;
fSpeedBadge = NO;
[NSApp setApplicationIconImage: [NSImage imageNamed: @"NSApplicationIcon"]];
}