From 492fe96285a5ba81e8ece3754ed6a8feb5bbeff5 Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Fri, 21 Jan 2011 15:38:50 +0000 Subject: Video doesn't use a layer as we hand it off to the fullscreen player. Fix null pointer deref. Bug:3364538 Change-Id: Iafeecd81ec422de6e17ec8a0c36c29e4fcf7fc74 --- WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'WebCore/platform/graphics/android') diff --git a/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp b/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp index d99c1cb..46be9bb 100644 --- a/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp +++ b/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp @@ -758,14 +758,15 @@ void GraphicsLayerAndroid::setContentsToImage(Image* image) void GraphicsLayerAndroid::setContentsToMedia(PlatformLayer* mediaLayer) { - if (m_contentLayer != mediaLayer) { + // Only fullscreen video on Android, so media doesn't get it's own layer. + // We might still have other layers though. + if (m_contentLayer != mediaLayer && mediaLayer) { m_contentLayer->unref(); m_contentLayer = mediaLayer; m_contentLayer->ref(); setNeedsDisplay(); + askForSync(); } - - askForSync(); } PlatformLayer* GraphicsLayerAndroid::platformLayer() const -- cgit v1.1