Commit 95116fa3 authored by Kentaro Hara's avatar Kentaro Hara Committed by Commit Bot

Add a missing null check for WebElement::ImageContents()

Bug: 869581
Change-Id: Ibe28c2ed55441c74d9faa845f81801c762559de7
Reviewed-on: https://chromium-review.googlesource.com/1184132
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarJeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585379}
parent 83a04357
...@@ -155,9 +155,10 @@ WebRect WebElement::BoundsInViewport() const { ...@@ -155,9 +155,10 @@ WebRect WebElement::BoundsInViewport() const {
SkBitmap WebElement::ImageContents() { SkBitmap WebElement::ImageContents() {
if (IsNull()) if (IsNull())
return {}; return {};
Image* image = Unwrap<Element>()->ImageContents();
return Unwrap<Element>()->ImageContents()->AsSkBitmapForCurrentFrame( if (!image)
kRespectImageOrientation); return {};
return image->AsSkBitmapForCurrentFrame(kRespectImageOrientation);
} }
void WebElement::RequestFullscreen() { void WebElement::RequestFullscreen() {
......
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