summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-31 15:12:19 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-31 15:12:19 +0000
commiteb993e2b3c376067a62e614f733c24b2027b4ead (patch)
tree6d24e3c677e48d59a5908e00a09338f5fc951a69
parent42b59f4b9099168bef43a7b33df9447ec198cfab (diff)
downloadchromium_src-eb993e2b3c376067a62e614f733c24b2027b4ead.zip
chromium_src-eb993e2b3c376067a62e614f733c24b2027b4ead.tar.gz
chromium_src-eb993e2b3c376067a62e614f733c24b2027b4ead.tar.bz2
Fix a crash when painting is disabled. We would be passed NULL and it wasn't checking the correct value for this case.
Review URL: http://codereview.chromium.org/8767 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4281 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/port/platform/graphics/GraphicsContextSkia.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/webkit/port/platform/graphics/GraphicsContextSkia.cpp b/webkit/port/platform/graphics/GraphicsContextSkia.cpp
index f842693..3591043 100644
--- a/webkit/port/platform/graphics/GraphicsContextSkia.cpp
+++ b/webkit/port/platform/graphics/GraphicsContextSkia.cpp
@@ -182,7 +182,7 @@ GraphicsContext::GraphicsContext(PlatformGraphicsContext *gc)
: m_common(createGraphicsContextPrivate())
, m_data(new GraphicsContextPlatformPrivate(gc))
{
- setPaintingDisabled(!platformContext()->canvas());
+ setPaintingDisabled(!gc || !platformContext()->canvas());
}
GraphicsContext::~GraphicsContext()