Commit 954848ed authored by Donn Denman's avatar Donn Denman Committed by Commit Bot

[Preview Tab] Fix NPE in getMaxSheetHeight.

BUG=1068493

Change-Id: I49c6b8fa21b2b35d8f1a95952136ef9b09ad8107
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2139360
Commit-Queue: Matthew Jones <mdjones@chromium.org>
Auto-Submit: Donn Denman <donnd@chromium.org>
Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#757207}
parent 3e75a061
...@@ -242,7 +242,7 @@ public class EphemeralTabCoordinator implements View.OnLayoutChangeListener { ...@@ -242,7 +242,7 @@ public class EphemeralTabCoordinator implements View.OnLayoutChangeListener {
private int getMaxSheetHeight() { private int getMaxSheetHeight() {
Tab tab = mTabProvider.get(); Tab tab = mTabProvider.get();
if (tab == null) return 0; if (tab == null || tab.getView() == null) return 0;
return (int) (tab.getView().getHeight() * 0.9f); return (int) (tab.getView().getHeight() * 0.9f);
} }
......
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