diff options
author | 2013-11-12 13:51:03 +0000 | |
---|---|---|
committer | 2013-11-12 13:51:03 +0000 | |
commit | 3bddb38e6468c6294e40e5307f05e6b56bdd6a6c (patch) | |
tree | 9177074956e7d9c0e3757fe8c58769088391931e /tests | |
parent | 7bce8e233925a8e0b12666e4a89a8ed3a55421e6 (diff) |
Fix crash in tests on valgrind bot
https://codereview.chromium.org/63543005/
git-svn-id: http://skia.googlecode.com/svn/trunk@12234 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r-- | tests/SurfaceTest.cpp | 14 |
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 } |