From cf6e10e145f44cab3eb70f3782b51a92cf61ae7d Mon Sep 17 00:00:00 2001 From: "Shimeng (Simon) Wang" Date: Wed, 25 Aug 2010 17:27:07 -0700 Subject: Add a NULL guard. issue:2884022 Change-Id: I471fca7296ca233bc4d9e1c75d173094265c9a9f --- WebKit/android/nav/WebView.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'WebKit') 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(layer->getChild(0))); + } delete m_baseLayer; m_baseLayer = layer; CachedRoot* root = getFrameCache(DontAllowNewer); -- cgit v1.1