diff --git a/services/audio_service/client/src/fast_audio_stream.cpp b/services/audio_service/client/src/fast_audio_stream.cpp index 24df2b7fb1f4d4d7cf77457cf6c8ca01012fb115..7e30e0d7b34765802db15d31994baabdb9c7730c 100644 --- a/services/audio_service/client/src/fast_audio_stream.cpp +++ b/services/audio_service/client/src/fast_audio_stream.cpp @@ -370,6 +370,7 @@ int32_t FastAudioStream::SetMute(bool mute, StateChangeCmdType cmdType) bool FastAudioStream::GetMute() { + CHECK_AND_RETURN_RET_LOG(processClient_ != nullptr, false, "GetMute failed: null process"); return processClient_->GetMute(); } @@ -391,6 +392,7 @@ int32_t FastAudioStream::SetDuckVolume(float volume) float FastAudioStream::GetDuckVolume() { + CHECK_AND_RETURN_RET_LOG(processClient_ != nullptr, 1.0f, "GetDuckVolume failed: null process"); // 1.0f for default return processClient_->GetDuckVolume(); }