Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f001f08 authored by Pawan Wagh's avatar Pawan Wagh Committed by Android (Google) Code Review
Browse files

Merge "Fixing null deference in android.hardware.usb.gadget-service.example"

parents f44d49e0 6fb5cb33
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -92,6 +92,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,