Avoid crashing when failing graphics VTS
When the tests fail, ensure we continue running so we can run the
remainder of the tests.
Bug: 304976052
Test: atest GraphicsComposerAidlCommandTest
Change-Id: Ia6ab2bbd284bb7eddeb49164dcbe7285829ad9c3
diff --git a/graphics/composer/aidl/vts/VtsComposerClient.cpp b/graphics/composer/aidl/vts/VtsComposerClient.cpp
index 2c24bfb..89ba2e6 100644
--- a/graphics/composer/aidl/vts/VtsComposerClient.cpp
+++ b/graphics/composer/aidl/vts/VtsComposerClient.cpp
@@ -68,6 +68,9 @@
std::pair<ScopedAStatus, int32_t> VtsComposerClient::getInterfaceVersion() const {
int32_t version = 1;
+ if (!mComposerClient) {
+ return {ScopedAStatus{nullptr}, version};
+ }
auto status = mComposerClient->getInterfaceVersion(&version);
return {std::move(status), version};
}