fix nullptr error

This commit is contained in:
Terrence
2025-04-09 08:24:02 +08:00
parent 9e0de3b302
commit 69540c6551
2 changed files with 6 additions and 2 deletions

View File

@@ -78,7 +78,9 @@ void AudioProcessor::Start() {
void AudioProcessor::Stop() {
xEventGroupClearBits(event_group_, PROCESSOR_RUNNING);
afe_iface_->reset_buffer(afe_data_);
if (afe_data_ != nullptr) {
afe_iface_->reset_buffer(afe_data_);
}
}
bool AudioProcessor::IsRunning() {