aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-12 13:51:03 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-12 13:51:03 +0000
commit3bddb38e6468c6294e40e5307f05e6b56bdd6a6c (patch)
tree9177074956e7d9c0e3757fe8c58769088391931e /tests
parent7bce8e233925a8e0b12666e4a89a8ed3a55421e6 (diff)
Fix crash in tests on valgrind bot
Diffstat (limited to 'tests')
-rw-r--r--tests/SurfaceTest.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp
index 1d713e780b..5e950170ef 100644
--- a/tests/SurfaceTest.cpp
+++ b/tests/SurfaceTest.cpp
@@ -243,12 +243,14 @@ static void TestSurface(skiatest::Reporter* reporter, GrContextFactory* factory)
TestGetTexture(reporter, kPicture_SurfaceType, NULL);
if (NULL != factory) {
GrContext* context = factory->get(GrContextFactory::kNative_GLContextType);
- Test_crbug263329(reporter, context);
- TestSurfaceCopyOnWrite(reporter, kGpu_SurfaceType, context);
- TestSurfaceWritableAfterSnapshotRelease(reporter, kGpu_SurfaceType, context);
- TestSurfaceNoCanvas(reporter, kGpu_SurfaceType, context, SkSurface::kDiscard_ContentChangeMode);
- TestSurfaceNoCanvas(reporter, kGpu_SurfaceType, context, SkSurface::kRetain_ContentChangeMode);
- TestGetTexture(reporter, kGpu_SurfaceType, context);
+ if (NULL != context) {
+ Test_crbug263329(reporter, context);
+ TestSurfaceCopyOnWrite(reporter, kGpu_SurfaceType, context);
+ TestSurfaceWritableAfterSnapshotRelease(reporter, kGpu_SurfaceType, context);
+ TestSurfaceNoCanvas(reporter, kGpu_SurfaceType, context, SkSurface::kDiscard_ContentChangeMode);
+ TestSurfaceNoCanvas(reporter, kGpu_SurfaceType, context, SkSurface::kRetain_ContentChangeMode);
+ TestGetTexture(reporter, kGpu_SurfaceType, context);
+ }
}
#endif
}