From 9dbad168657fa1116271ab6338b70868558dd155 Mon Sep 17 00:00:00 2001 From: "ericroman@google.com" Date: Fri, 31 Oct 2008 21:35:27 +0000 Subject: Fix a null-ptr renderer crash. http://code.google.com/p/chromium/issues/detail?id=3946 Review URL: http://codereview.chromium.org/8978 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4327 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/port/platform/graphics/GraphicsContextSkia.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'webkit/port/platform') diff --git a/webkit/port/platform/graphics/GraphicsContextSkia.cpp b/webkit/port/platform/graphics/GraphicsContextSkia.cpp index c91de5d..b14839e 100644 --- a/webkit/port/platform/graphics/GraphicsContextSkia.cpp +++ b/webkit/port/platform/graphics/GraphicsContextSkia.cpp @@ -996,21 +996,29 @@ void GraphicsContext::setURLForRect(const KURL& link, const IntRect& destRect) void GraphicsContext::setPlatformFillColor(const Color& color) { + if (paintingDisabled()) + return; platformContext()->setFillColor(color.rgb()); } void GraphicsContext::setPlatformStrokeColor(const Color& strokecolor) { + if (paintingDisabled()) + return; platformContext()->setStrokeColor(strokecolor.rgb()); } void GraphicsContext::setPlatformStrokeThickness(float thickness) { + if (paintingDisabled()) + return; platformContext()->setStrokeThickness(thickness); } void GraphicsContext::setPlatformTextDrawingMode(int mode) { + if (paintingDisabled()) + return; platformContext()->setTextDrawingMode(mode); } -- cgit v1.1