diff options
author | Chris Craik <ccraik@google.com> | 2012-05-17 11:30:51 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2012-05-17 12:57:45 -0700 |
commit | 67c0962c1caf6386db484b4a1e916954dc0e8226 (patch) | |
tree | 5b26bca41f5932557c34a3cf7ca74fd783f88c4d /Source/WebCore/platform/graphics/android/layers | |
parent | 020855054c167ec65720853fff4116f51d6e6f31 (diff) | |
download | external_webkit-67c0962c1caf6386db484b4a1e916954dc0e8226.zip external_webkit-67c0962c1caf6386db484b4a1e916954dc0e8226.tar.gz external_webkit-67c0962c1caf6386db484b4a1e916954dc0e8226.tar.bz2 |
Check layer state before dereferencing
bug:6509226
Change-Id: Ie64bc2d92ddb2f323b20fa5bc8d1385dcb0e04c1
Diffstat (limited to 'Source/WebCore/platform/graphics/android/layers')
-rw-r--r-- | Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp b/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp index 3239599..3241a61 100644 --- a/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp @@ -80,7 +80,9 @@ void BaseLayerAndroid::updatePositionsRecursive(const SkRect& visibleContentRect updateLayerPositions(visibleContentRect); TransformationMatrix ident; FloatRect clip(0, 0, getWidth(), getHeight()); - updateGLPositionsAndScale(ident, clip, 1, state()->scale()); + + float scale = state() ? state()->scale() : 1.0f; + updateGLPositionsAndScale(ident, clip, 1, scale); } ForegroundBaseLayerAndroid::ForegroundBaseLayerAndroid(LayerContent* content) |