diff --git a/nfc/1.0/default/Nfc.cpp b/nfc/1.0/default/Nfc.cpp index fcdcbbc301..a1e50f059c 100644 --- a/nfc/1.0/default/Nfc.cpp +++ b/nfc/1.0/default/Nfc.cpp @@ -38,7 +38,7 @@ Nfc::Nfc(nfc_nci_device_t* device) : mDevice(device) {} ::android::hardware::Return Nfc::coreInitialized(const hidl_vec& data) { hidl_vec copy = data; - if (mDevice == nullptr) { + if (mDevice == nullptr || copy.size() == 0) { return NfcStatus::FAILED; } int ret = mDevice->core_initialized(mDevice, ©[0]);