aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-12 17:33:02 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-12 17:33:02 +0000
commit5fa42d1621c74d206fe746ec2c5b7962a97cf6d1 (patch)
treecf85acb3a57b46bd05a629e3edcdcadffab0c76b /tests
parentcac8d01eabd05d11365f56b6af3f30bccb173487 (diff)
"Fix" another crash on valgrind bot
Diffstat (limited to 'tests')
-rw-r--r--tests/DeferredCanvasTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/DeferredCanvasTest.cpp b/tests/DeferredCanvasTest.cpp
index a9679a339d..bcee382250 100644
--- a/tests/DeferredCanvasTest.cpp
+++ b/tests/DeferredCanvasTest.cpp
@@ -703,6 +703,10 @@ static void TestDeferredCanvasSurface(skiatest::Reporter* reporter, GrContextFac
#if SK_SUPPORT_GPU
if (useGpu) {
GrContext* context = factory->get(GrContextFactory::kNative_GLContextType);
+ if (NULL == context) {
+ return;
+ }
+
surface = SkSurface::NewRenderTarget(context, imageSpec);
} else {
surface = SkSurface::NewRaster(imageSpec);