Fixing null deference crash in audio service
Bug: 267517128
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I8949270b456d65e516946ffd294a5328da9de14b
diff --git a/audio/aidl/default/Module.cpp b/audio/aidl/default/Module.cpp
index 82d1ef8..905ff2c 100644
--- a/audio/aidl/default/Module.cpp
+++ b/audio/aidl/default/Module.cpp
@@ -953,7 +953,7 @@
}
ndk::ScopedAStatus Module::getMicrophones(std::vector<MicrophoneInfo>* _aidl_return) {
- *_aidl_return = mConfig->microphones;
+ *_aidl_return = getConfig().microphones;
LOG(DEBUG) << __func__ << ": returning " << ::android::internal::ToString(*_aidl_return);
return ndk::ScopedAStatus::ok();
}