aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/EGLImageTest.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-01-10 09:57:53 -0500
committerGravatar Mike Klein <mtklein@chromium.org>2018-01-10 17:56:20 +0000
commit5366e59e8826a235d25f34f50ae1b93ee9675663 (patch)
tree5c54a95c62d115993289d05078fc01e5f0106556 /tests/EGLImageTest.cpp
parentb19737d78afd3b5fab247b05fa475b6f6f47f54f (diff)
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 <egdaniel@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'tests/EGLImageTest.cpp')
-rw-r--r--tests/EGLImageTest.cpp3
1 files changed, 2 insertions, 1 deletions
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;