commit | 06f79dbd05af653fbcfa2edbf534d6e2be2a6896 | [log] [tgz] |
---|---|---|
author | Michael Butler <butlermichael@google.com> | Fri Jul 14 22:46:57 2017 +0000 |
committer | android-build-merger <android-build-merger@google.com> | Fri Jul 14 22:46:57 2017 +0000 |
tree | 72105ebb6175be16b179f349a76f7f04a91e1032 | |
parent | d19838d2c4130ab918ac94af3775173bdff46d26 [diff] | |
parent | 80002c1ff304eb61bd7f1718d56750ecf3ea08a6 [diff] |
Merge "Added protections to RenderScript VTS class teardown." am: 80002c1ff3 Change-Id: I55d1b0432e87068913a0e40cb72717a3a034b1e7
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).