Fixing null deference in android.hardware.usb.gadget-service.example am: 9b13007164
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2412576 Change-Id: I5c5ade46872035607fe95943b50e746de680aaec Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
daccd40364
1 changed files with 3 additions and 0 deletions
|
@ -91,6 +91,9 @@ void currentFunctionsAppliedCallback(bool functionsApplied, void* payload) {
|
|||
|
||||
ScopedAStatus UsbGadget::getCurrentUsbFunctions(const shared_ptr<IUsbGadgetCallback>& callback,
|
||||
int64_t in_transactionId) {
|
||||
if (callback == nullptr) {
|
||||
return ScopedAStatus::fromExceptionCode(EX_NULL_POINTER);
|
||||
}
|
||||
ScopedAStatus ret = callback->getCurrentUsbFunctionsCb(
|
||||
mCurrentUsbFunctions,
|
||||
mCurrentUsbFunctionsApplied ? Status::FUNCTIONS_APPLIED : Status::FUNCTIONS_NOT_APPLIED,
|
||||
|
|
Loading…
Reference in a new issue