Commit a3464855 authored by thildebr's avatar thildebr Committed by Commit Bot

Add null check to InfoBarLayout.setIsUsingBigIcon to avoid NPE.

It's possible for us to get a null icon from getInstantAppLaunchData, so
perform a null check before using the icon in InfoBarLayout.

BUG=731801

Review-Url: https://codereview.chromium.org/2936703002
Cr-Commit-Position: refs/heads/master@{#478787}
parent ef26b600
...@@ -251,6 +251,8 @@ public final class InfoBarLayout extends ViewGroup implements View.OnClickListen ...@@ -251,6 +251,8 @@ public final class InfoBarLayout extends ViewGroup implements View.OnClickListen
* Adjusts styling to account for the big icon layout. * Adjusts styling to account for the big icon layout.
*/ */
public void setIsUsingBigIcon() { public void setIsUsingBigIcon() {
if (mIconView == null) return;
LayoutParams lp = (LayoutParams) mIconView.getLayoutParams(); LayoutParams lp = (LayoutParams) mIconView.getLayoutParams();
lp.width = mBigIconSize; lp.width = mBigIconSize;
lp.height = mBigIconSize; lp.height = mBigIconSize;
......
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