| Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/ChromeHomeNewTabPage.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/ChromeHomeNewTabPage.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/ChromeHomeNewTabPage.java
|
| index 7d770e3d926987771108b10f35560b79015236f5..8517a18a64203cc4503dfe839972fd27bef2c417 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/ChromeHomeNewTabPage.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/ChromeHomeNewTabPage.java
|
| @@ -188,7 +188,7 @@ public class ChromeHomeNewTabPage implements NativePage, TemplateUrlServiceObser
|
| // OverviewModeBehavior, we have no good signal to show the BottomSheet when an NTP is
|
| // selected in the tab switcher. Eventually this won't matter because we will not allow
|
| // NTPs to remain open after the user leaves them.
|
| - if (getLayoutManager().overviewVisible()) return;
|
| + if (getLayoutManager() != null && getLayoutManager().overviewVisible()) return;
|
|
|
| mBottomSheet.setSheetState(BottomSheet.SHEET_STATE_HALF, true);
|
| }
|
| @@ -218,7 +218,9 @@ public class ChromeHomeNewTabPage implements NativePage, TemplateUrlServiceObser
|
| @Override
|
| public void onClick(View v) {
|
| mBottomSheet.setSheetState(BottomSheet.SHEET_STATE_PEEK, true);
|
| - if (mShowOverviewOnClose) getLayoutManager().showOverview(false);
|
| + if (mShowOverviewOnClose && getLayoutManager() != null) {
|
| + getLayoutManager().showOverview(false);
|
| + }
|
|
|
| // Close the tab after showing the overview mode so the bottom sheet doesn't open
|
| // if another NTP is selected when this one is closed.
|
|
|