summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2011-01-31 13:31:23 +0000
committerKristian Monsen <kristianm@google.com>2011-01-31 14:21:06 +0000
commit1d9d64a4048883a707deb9f2ec32aa311e11dcbb (patch)
treece0fbaec5a79fb96295986e489b5f812c330edd8
parentc36054aacf610538d595ecc02cfbef4e6678eaa7 (diff)
downloadexternal_webkit-1d9d64a4048883a707deb9f2ec32aa311e11dcbb.zip
external_webkit-1d9d64a4048883a707deb9f2ec32aa311e11dcbb.tar.gz
external_webkit-1d9d64a4048883a707deb9f2ec32aa311e11dcbb.tar.bz2
Fix for bug 3405738, crash in nav cache
Change-Id: I43c87a3b8a772857fd2775b54a68d8df6c6441ef
-rw-r--r--WebKit/android/nav/CachedFrame.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/WebKit/android/nav/CachedFrame.cpp b/WebKit/android/nav/CachedFrame.cpp
index b18cdf1..27eebd3 100644
--- a/WebKit/android/nav/CachedFrame.cpp
+++ b/WebKit/android/nav/CachedFrame.cpp
@@ -50,11 +50,13 @@ WebCore::IntRect CachedFrame::adjustBounds(const CachedNode* node,
mRoot->mViewBounds.x(), mRoot->mViewBounds.y(),
mRoot->mViewBounds.width(), mRoot->mViewBounds.height());
#if USE(ACCELERATED_COMPOSITING)
- const CachedLayer* cachedLayer = layer(node);
- const WebCore::LayerAndroid* rootLayer = mRoot->rootLayer();
- const LayerAndroid* aLayer = cachedLayer->layer(rootLayer);
- if (aLayer)
- return cachedLayer->adjustBounds(rootLayer, rect);
+ if (mRoot) {
+ const CachedLayer* cachedLayer = layer(node);
+ const WebCore::LayerAndroid* rootLayer = mRoot->rootLayer();
+ const LayerAndroid* aLayer = cachedLayer->layer(rootLayer);
+ if (aLayer)
+ return cachedLayer->adjustBounds(rootLayer, rect);
+ }
#endif
return rect;
}