From 5366e59e8826a235d25f34f50ae1b93ee9675663 Mon Sep 17 00:00:00 2001 From: Greg Daniel Date: Wed, 10 Jan 2018 09:57:53 -0500 Subject: Add valid checks in places we query isTestingOnlyBackendTexture Bug: skia:7477 Change-Id: I410427f12c7bb85d11a5e4ed1f09bbd80bbbb54c Reviewed-on: https://skia-review.googlesource.com/93000 Commit-Queue: Greg Daniel Reviewed-by: Brian Osman --- tests/EGLImageTest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/EGLImageTest.cpp') diff --git a/tests/EGLImageTest.cpp b/tests/EGLImageTest.cpp index 9ea6379dc6..efa7de20d7 100644 --- a/tests/EGLImageTest.cpp +++ b/tests/EGLImageTest.cpp @@ -88,7 +88,8 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(EGLImageTest, reporter, ctxInfo) { backendTexture1 = gpu1->createTestingOnlyBackendTexture(nullptr, kSize, kSize, kRGBA_8888_GrPixelConfig, false, GrMipMapped::kNo); - if (!gpu1->isTestingOnlyBackendTexture(backendTexture1)) { + + if (!backendTexture1.isValid() || !gpu1->isTestingOnlyBackendTexture(backendTexture1)) { ERRORF(reporter, "Error creating texture for EGL Image"); cleanup(glCtx0, externalTexture.fID, glCtx1.get(), context1, &backendTexture1, image); return; -- cgit v1.2.3