| commit | 80002c1ff304eb61bd7f1718d56750ecf3ea08a6 | [log] [tgz] |
|---|---|---|
| author | Treehugger Robot <treehugger-gerrit@google.com> | Fri Jul 14 22:38:38 2017 +0000 |
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Fri Jul 14 22:38:38 2017 +0000 |
| tree | 24299a58e61ce815d24b3a6fd1bfaabe0d193c27 | |
| parent | 16a0437ab3fa7ba0a66f6f3a66685112d817669b [diff] | |
| parent | 4c65977854b135ad810d8e15f6b4b5103077f462 [diff] |
Merge "Added protections to RenderScript VTS class teardown."
diff --git a/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.cpp b/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.cpp index 2670b8d..c6eecd6 100644 --- a/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.cpp +++ b/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.cpp
@@ -28,8 +28,10 @@ } void RenderscriptHidlTest::TearDown() { - context->contextFinish(); - context->contextDestroy(); + if (context.get() != nullptr) { + context->contextFinish(); + context->contextDestroy(); + } } // A class for test environment setup (kept since this file is a template).