summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-31 21:35:27 +0000
committerericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-31 21:35:27 +0000
commit9dbad168657fa1116271ab6338b70868558dd155 (patch)
treee669cd2f3504ef175eca26e65357641c2811a389 /webkit
parent042811ccf79795d7847a672345770b801987c217 (diff)
downloadchromium_src-9dbad168657fa1116271ab6338b70868558dd155.zip
chromium_src-9dbad168657fa1116271ab6338b70868558dd155.tar.gz
chromium_src-9dbad168657fa1116271ab6338b70868558dd155.tar.bz2
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
Diffstat (limited to 'webkit')
-rw-r--r--webkit/port/platform/graphics/GraphicsContextSkia.cpp8
1 files changed, 8 insertions, 0 deletions
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);
}