From 261f89503d6606bb4896a4effe0ab4d5b4e01d8a Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Mon, 21 May 2012 11:08:49 -0700 Subject: Add checks for null base layer content bug:6519982 Change-Id: I1ef0eda2b94090cc894441c1620ae85e7fd86d22 --- Source/WebKit/android/nav/WebView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/WebKit/android/nav/WebView.cpp') diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp index 473efdb..7485e83 100644 --- a/Source/WebKit/android/nav/WebView.cpp +++ b/Source/WebKit/android/nav/WebView.cpp @@ -530,7 +530,7 @@ bool setBaseLayer(BaseLayerAndroid* newBaseLayer, bool showVisualIndicator, void copyBaseContentToPicture(SkPicture* picture) { - if (!m_baseLayer) + if (!m_baseLayer || !m_baseLayer->content()) return; LayerContent* content = m_baseLayer->content(); content->draw(picture->beginRecording(content->width(), content->height(), @@ -539,7 +539,7 @@ void copyBaseContentToPicture(SkPicture* picture) } bool hasContent() { - if (!m_baseLayer) + if (!m_baseLayer || !m_baseLayer->content()) return false; return !m_baseLayer->content()->isEmpty(); } -- cgit v1.1