diff options
author | John Reck <jreck@google.com> | 2012-02-21 14:16:31 -0800 |
---|---|---|
committer | John Reck <jreck@google.com> | 2012-02-21 14:16:31 -0800 |
commit | fba5bad67c2589216f05da70a7f2fbd537637672 (patch) | |
tree | c48dbdcb50f67a99ec144c7881bb6a5c51b276e7 /Source | |
parent | a54eb7fa1e850d7096f97065f35ed00bcb5384d3 (diff) | |
download | external_webkit-fba5bad67c2589216f05da70a7f2fbd537637672.zip external_webkit-fba5bad67c2589216f05da70a7f2fbd537637672.tar.gz external_webkit-fba5bad67c2589216f05da70a7f2fbd537637672.tar.bz2 |
Add two missing null checks
Bug: 6008243
Change-Id: I32df636933d77dc9d7174f7a025a1ee70bb945fa
Diffstat (limited to 'Source')
-rw-r--r-- | Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp | 2 | ||||
-rw-r--r-- | Source/WebKit/android/nav/WebView.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp b/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp index 2d2867c..7208380 100644 --- a/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp @@ -320,6 +320,8 @@ void BaseLayerAndroid::drawBasePictureInGL() void BaseLayerAndroid::updateLayerPositions(SkRect& visibleRect) { LayerAndroid* compositedRoot = static_cast<LayerAndroid*>(getChild(0)); + if (!compositedRoot) + return; TransformationMatrix ident; compositedRoot->updateFixedLayersPositions(visibleRect); FloatRect clip(0, 0, content()->width(), content()->height()); diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp index d2d1321..e86b85a 100644 --- a/Source/WebKit/android/nav/WebView.cpp +++ b/Source/WebKit/android/nav/WebView.cpp @@ -1415,7 +1415,7 @@ void setTextSelection(SelectText *selection) { int getHandleLayerId(SelectText::HandleId handleId, SkIRect& cursorRect) { SelectText* selectText = static_cast<SelectText*>(getDrawExtra(DrawExtrasSelection)); - if (!selectText) + if (!selectText || !m_baseLayer) return -1; int layerId = selectText->caretLayerId(handleId); IntRect rect = selectText->caretRect(handleId); |