summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/WebKit/android/nav/WebView.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp
index 92fbef6..07b69c7 100644
--- a/Source/WebKit/android/nav/WebView.cpp
+++ b/Source/WebKit/android/nav/WebView.cpp
@@ -304,8 +304,14 @@ PictureSet* draw(SkCanvas* canvas, SkColor bgColor, DrawExtras extras, bool spli
// draw the content of the base layer first
LayerContent* content = m_baseLayer->content();
int sc = canvas->save(SkCanvas::kClip_SaveFlag);
- canvas->clipRect(SkRect::MakeLTRB(0, 0, content->width(),
- content->height()), SkRegion::kDifference_Op);
+ int contentWidth = 0;
+ int contentHeight = 0;
+ if (content) {
+ contentWidth = content->width();
+ contentHeight = content->height();
+ }
+ canvas->clipRect(SkRect::MakeLTRB(0, 0, contentWidth, contentHeight),
+ SkRegion::kDifference_Op);
Color c = m_baseLayer->getBackgroundColor();
canvas->drawColor(SkColorSetARGBInline(c.alpha(), c.red(), c.green(), c.blue()));
canvas->restoreToCount(sc);