Commit 601eae93 authored by Sidney San Martín's avatar Sidney San Martín Committed by Commit Bot

Early-out *before* looking up an enabled feature if being removed from a window.

This fixes a crash (caught by ASAN) when the feature list gets torn down
before the window containing the download shelf.

Bug: 806901
Change-Id: I00ddc55d183f2b29bf23ad3304b7c700f747894f
Reviewed-on: https://chromium-review.googlesource.com/899735Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Sidney San Martín <sdy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534452}
parent 0d2fea30
...@@ -129,10 +129,10 @@ constexpr CGFloat kMDShelfHeight = 44; ...@@ -129,10 +129,10 @@ constexpr CGFloat kMDShelfHeight = 44;
} }
- (void)adjustHeightForDivider { - (void)adjustHeightForDivider {
if (!base::FeatureList::IsEnabled(features::kMacMaterialDesignDownloadShelf))
return;
if (!self.window) if (!self.window)
return; return;
if (!base::FeatureList::IsEnabled(features::kMacMaterialDesignDownloadShelf))
return;
[self stopAnimation]; [self stopAnimation];
if (NSHeight([self bounds])) { if (NSHeight([self bounds])) {
[self setHeight:kMDShelfHeight + [self cr_lineWidth]]; [self setHeight:kMDShelfHeight + [self cr_lineWidth]];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment