Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(755)

Unified Diff: chrome/browser/cocoa/download_started_animation_mac.mm

Issue 3060047: [Mac] Prevent a crash with the DownloadStartedAnimation. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/download_started_animation_mac.mm
diff --git a/chrome/browser/cocoa/download_started_animation_mac.mm b/chrome/browser/cocoa/download_started_animation_mac.mm
index f756bb043e83884897cdc8ee7ee2fcc92be832a6..dfd7db70206fee945597bb045c9e22be67aa44ed 100644
--- a/chrome/browser/cocoa/download_started_animation_mac.mm
+++ b/chrome/browser/cocoa/download_started_animation_mac.mm
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -176,6 +176,10 @@ class DownloadAnimationTabObserver : public NotificationObserver {
// Will be deleted when the animation is complete in -animationComplete.
DownloadStartedAnimationMac* controller =
[[self alloc] initWithTabContents:contents];
+ // The initializer can return nil.
+ if (!controller)
+ return;
+
// The |animation_| releaes itself when done.
[controller->animation_ startAnimation];
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698