diff options
author | Shimeng (Simon) Wang <swang@google.com> | 2010-08-25 17:27:07 -0700 |
---|---|---|
committer | Shimeng (Simon) Wang <swang@google.com> | 2010-08-25 18:08:56 -0700 |
commit | cf6e10e145f44cab3eb70f3782b51a92cf61ae7d (patch) | |
tree | 00ef896904084169a2bc00b2217ced0e49ed3338 /WebKit | |
parent | 240e47ec976648d0a0455123e7f1b57bfaa55f34 (diff) | |
download | external_webkit-cf6e10e145f44cab3eb70f3782b51a92cf61ae7d.zip external_webkit-cf6e10e145f44cab3eb70f3782b51a92cf61ae7d.tar.gz external_webkit-cf6e10e145f44cab3eb70f3782b51a92cf61ae7d.tar.bz2 |
Add a NULL guard.
issue:2884022
Change-Id: I471fca7296ca233bc4d9e1c75d173094265c9a9f
Diffstat (limited to 'WebKit')
-rw-r--r-- | WebKit/android/nav/WebView.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index 9851ab5..c061461 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -1223,8 +1223,10 @@ static void copyScrollPositionRecursive(const LayerAndroid* from, void setBaseLayer(BaseLayerAndroid* layer) { - copyScrollPositionRecursive(compositeRoot(), + if (layer) { + copyScrollPositionRecursive(compositeRoot(), static_cast<LayerAndroid*>(layer->getChild(0))); + } delete m_baseLayer; m_baseLayer = layer; CachedRoot* root = getFrameCache(DontAllowNewer); |