diff --git a/drm/1.0/default/CryptoPlugin.cpp b/drm/1.0/default/CryptoPlugin.cpp index 1a32706ba5..fb61ede14f 100644 --- a/drm/1.0/default/CryptoPlugin.cpp +++ b/drm/1.0/default/CryptoPlugin.cpp @@ -62,6 +62,11 @@ namespace implementation { const DestinationBuffer& destination, decrypt_cb _hidl_cb) { + if (mSharedBufferBase == NULL) { + _hidl_cb(Status::BAD_VALUE, 0, "decrypt buffer base not set"); + return Void(); + } + android::CryptoPlugin::Mode legacyMode; switch(mode) { case Mode::UNENCRYPTED: