# HG changeset patch
# User t_mrc-ct@sourceforge.jp
# Date 1350811043 -32400
# Branch GECKO2450_2014042411_RELBRANCH
# Node ID b9e58212c805be0dbe99b0d6c107d1233fcacb1c
# Parent  1524c6a3cd2d80cba023503abb7f928595bc5cdd
debug build error

diff --git a/mailnews/base/src/nsMessengerOSXIntegration.mm b/mailnews/base/src/nsMessengerOSXIntegration.mm
--- a/mailnews/base/src/nsMessengerOSXIntegration.mm
+++ b/mailnews/base/src/nsMessengerOSXIntegration.mm
@@ -531,26 +531,25 @@
   return NS_OK;
 }
 
 nsresult
 nsMessengerOSXIntegration::RestoreDockIcon()
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
 
-  if (mOnLeopardOrLater)
-  {
-    id tile = [[NSApplication sharedApplication] dockTile];
-    [tile setBadgeLabel: nil];
-  }
-  else // 10.4
+  if (!mOnLeopardOrLater) // 10.4
   {
     RestoreApplicationDockTileImage();
+    return NS_OK;
   }
 
+  id tile = [[NSApplication sharedApplication] dockTile];
+  [tile setBadgeLabel: nil];
+
   return NS_OK;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
 
 nsresult
 nsMessengerOSXIntegration::BadgeDockIcon()
 {
@@ -593,27 +592,27 @@
   nsAutoString badgeString;
   str->GetData(badgeString);
   if (badgeString.IsEmpty())
   {
     RestoreDockIcon();
     return NS_OK;
   }
 
-  // On 10.5 or later, we can use the new API for this.
-  if (mOnLeopardOrLater)
-  {
-    id tile = [[NSApplication sharedApplication] dockTile];
-    [tile setBadgeLabel:[NSString stringWithFormat:@"%S", total.get()]];
-    return NS_OK;
-  }
-  else
+  // On 10.4 or 10.5, we use the old API for this.
+  if (!mOnLeopardOrLater)
   {
     return BadgeDockIconForTiger(badgeString);
   }
+
+  id tile = [[NSApplication sharedApplication] dockTile];
+  [tile setBadgeLabel:[NSString stringWithFormat:@"%S", total.get()]];
+  return NS_OK;
+
+  NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
 
 nsresult
 nsMessengerOSXIntegration::BadgeDockIconForTiger(nsString& badgeString)
 {
   // On 10.4 we have to draw this manually, clearing any existing badge artifacts first.
   RestoreDockIcon();
   CGContextRef context = ::BeginCGContextForApplicationDockTile();
@@ -726,18 +725,16 @@
                  Long2Fix(95 - (boundingBox.bottom - boundingBox.top) / 2));
 
   ::ATSUDisposeStyle(style);
   ::ATSUDisposeTextLayout(textLayout);
 
   ::CGContextFlush(context);
   ::EndCGContextForApplicationDockTile(context);
   return NS_OK;
-
-  NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
 
 NS_IMETHODIMP
 nsMessengerOSXIntegration::OnItemPropertyFlagChanged(nsIMsgDBHdr *item, nsIAtom *property, uint32_t oldFlag, uint32_t newFlag)
 {
   return NS_OK;
 }
 
