From 544c0c1dc46702f4dfc8bd063807154f7cabaed5 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Wed, 23 May 2007 16:22:22 +0000 Subject: [PATCH] avoid unneeded retain/release in badger --- macosx/Badger.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/macosx/Badger.m b/macosx/Badger.m index f9a329faa..5c14af187 100644 --- a/macosx/Badger.m +++ b/macosx/Badger.m @@ -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"]]; }