summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-02-24 10:34:45 -0800
committerJohn Reck <jreck@google.com>2012-02-24 10:34:45 -0800
commitca8907cd631723128e1c3a8718e8d059998cb143 (patch)
treec872c6f2d90c7998cef2193dad2183ac6bd6c2a8 /Source
parent33832494c3158d465a98bd54616fc188dabae0b6 (diff)
downloadexternal_webkit-ca8907cd631723128e1c3a8718e8d059998cb143.zip
external_webkit-ca8907cd631723128e1c3a8718e8d059998cb143.tar.gz
external_webkit-ca8907cd631723128e1c3a8718e8d059998cb143.tar.bz2
Fix NPE crash
Bug: 6064378 Change-Id: I0dfb596df31b72e52e8b7846d6bcfffefb1b8403
Diffstat (limited to 'Source')
-rw-r--r--Source/WebKit/android/nav/WebView.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp
index 2bd76f5..7f7cf94 100644
--- a/Source/WebKit/android/nav/WebView.cpp
+++ b/Source/WebKit/android/nav/WebView.cpp
@@ -1311,7 +1311,8 @@ int getHandleLayerId(SelectText::HandleId handleId, SkIRect& cursorRect) {
m_baseLayer->updateLayerPositions(m_visibleRect);
LayerAndroid* root = compositeRoot();
LayerAndroid* layer = root ? root->findById(layerId) : 0;
- rect = layer->drawTransform()->mapRect(rect);
+ if (layer && layer->drawTransform())
+ rect = layer->drawTransform()->mapRect(rect);
}
cursorRect.set(rect.x(), rect.y(), rect.maxX(), rect.maxY());
return layerId;