Commit e4673c3f authored by Dmitry Gozman's avatar Dmitry Gozman Committed by Commit Bot

[DevTools] Fix npe when accessing RWHV in PageHandler::CaptureScreenshot

Bug: 841739
Change-Id: I6e61a5c11253096d80aeafb4b83ce653fbcfa0f0
Reviewed-on: https://chromium-review.googlesource.com/1235119
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: default avatarAlexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592868}
parent 9e714aaf
......@@ -607,7 +607,8 @@ void PageHandler::CaptureScreenshot(
Maybe<Page::Viewport> clip,
Maybe<bool> from_surface,
std::unique_ptr<CaptureScreenshotCallback> callback) {
if (!host_ || !host_->GetRenderWidgetHost()) {
if (!host_ || !host_->GetRenderWidgetHost() ||
!host_->GetRenderWidgetHost()->GetView()) {
callback->sendFailure(Response::InternalError());
return;
}
......
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