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

Commit 7cf1df7c authored by Roshan Pius's avatar Roshan Pius
Browse files

wifi(implementation): Check if wifi_chip is null in debug()

|chip_| could be null if wifi is not turned on.

Bug: 72470346
Test: Ensure that the device does not crash when bugreport is collected
with wifi off.

Change-Id: Iface5ecf0511ad88996ebad85ba3c037c3a8c5ee
parent 0d29cf99
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -80,6 +80,9 @@ Return<void> Wifi::getChip(ChipId chip_id, getChip_cb hidl_status_cb) {
Return<void> Wifi::debug(const hidl_handle& handle,
                         const hidl_vec<hidl_string>&) {
    LOG(INFO) << "-----------Debug is called----------------";
    if (!chip_.get()) {
        return Void();
    }
    return chip_->debug(handle, {});
}