diff --git a/drm/aidl/vts/drm_hal_common.cpp b/drm/aidl/vts/drm_hal_common.cpp index f5ef0e7da8..f0445a503f 100644 --- a/drm/aidl/vts/drm_hal_common.cpp +++ b/drm/aidl/vts/drm_hal_common.cpp @@ -263,6 +263,9 @@ std::vector DrmHalTest::getVendorUUID() { } bool DrmHalTest::isCryptoSchemeSupported(Uuid uuid, SecurityLevel level, std::string mime) { + if (drmFactory == nullptr) { + return false; + } CryptoSchemes schemes{}; auto ret = drmFactory->getSupportedCryptoSchemes(&schemes); EXPECT_OK(ret);