Commit 4b6e8d13 authored by Robert Ogden's avatar Robert Ogden Committed by Commit Bot

Guard against crash in PreviewsLPNavThrottle

See bug for more details.

TBR=tbansal@chromium.org

Bug: 961934
Change-Id: I7cca3920fa8c8a1402a7c2189a5e8775de58bd30
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1607182Reviewed-by: default avatarRobert Ogden <robertogden@chromium.org>
Reviewed-by: default avatarTarun Bansal <tbansal@chromium.org>
Commit-Queue: Robert Ogden <robertogden@chromium.org>
Cr-Commit-Position: refs/heads/master@{#658840}
parent 3beca772
......@@ -748,7 +748,8 @@ PreviewsLitePageNavigationThrottle::GetOrCreateServerLitePageInfo(
const ChromeNavigationUIData* chrome_navigation_ui_data =
static_cast<const ChromeNavigationUIData*>(
navigation_handle->GetNavigationUIData());
info->page_id = chrome_navigation_ui_data->data_reduction_proxy_page_id();
if (chrome_navigation_ui_data)
info->page_id = chrome_navigation_ui_data->data_reduction_proxy_page_id();
// The page id may not be set in some corner cases (like forward navigation),
// so make sure it gets set here.
if (info->page_id == 0U)
......
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