Add a null pointer check for wifi_chip in

configureChipToSupportIfaceTypeInternal.

Bug: 253411345
Test: atest VtsHalHostapdTargetTest
Change-Id: Ieb6de7311de8d98742e302b35196bee7fa7661ed
(cherry picked from commit b1c2d07e4e)
This commit is contained in:
Gabriel Biren
2022-10-15 00:04:49 +00:00
parent d8a70b00c6
commit 4e6349240e

View File

@@ -66,7 +66,7 @@ bool findAnyModeSupportingIfaceType(
bool configureChipToSupportIfaceTypeInternal(const sp<IWifiChip>& wifi_chip,
IfaceType type,
ChipModeId* configured_mode_id) {
if (!configured_mode_id) {
if (!configured_mode_id || !wifi_chip.get()) {
return false;
}
const auto& status_and_modes = HIDL_INVOKE(wifi_chip, getAvailableModes);