aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/DeferredCanvasTest.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-13 14:26:52 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-13 14:26:52 +0000
commite293005bd459934c3f389f9b05d6294c75f8a6e7 (patch)
tree8739ade80dc41c56823707f382ad3cb1b2976311 /tests/DeferredCanvasTest.cpp
parentc4330cac79e2d14b0f4e803d018789bc442a859e (diff)
"Fix" another crash in DeferredCanvasTest on valgrind bot
Diffstat (limited to 'tests/DeferredCanvasTest.cpp')
-rw-r--r--tests/DeferredCanvasTest.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/DeferredCanvasTest.cpp b/tests/DeferredCanvasTest.cpp
index bcee382250..45d0292676 100644
--- a/tests/DeferredCanvasTest.cpp
+++ b/tests/DeferredCanvasTest.cpp
@@ -775,6 +775,9 @@ static void TestDeferredCanvasSetSurface(skiatest::Reporter* reporter, GrContext
#if SK_SUPPORT_GPU
if (useGpu) {
GrContext* context = factory->get(GrContextFactory::kNative_GLContextType);
+ if (NULL == context) {
+ return;
+ }
surface = SkSurface::NewRenderTarget(context, imageSpec);
alternateSurface = SkSurface::NewRenderTarget(context, imageSpec);
} else {