[api] Fix crash loop on VoiceAssistantConfigurationRequest (#16757)

This commit is contained in:
J. Nick Koston
2026-06-01 15:32:23 -05:00
committed by Jesse Hills
parent 571a12ffe5
commit 559cfd1555

View File

@@ -1306,6 +1306,9 @@ void APIConnection::on_voice_assistant_announce_request(const VoiceAssistantAnno
bool APIConnection::send_voice_assistant_get_configuration_response_(const VoiceAssistantConfigurationRequest &msg) {
VoiceAssistantConfigurationResponse resp;
if (!this->check_voice_assistant_api_connection_()) {
// send_message encodes synchronously, so this stack local outlives the encode
const std::vector<std::string> empty_wake_words;
resp.active_wake_words = &empty_wake_words;
return this->send_message(resp);
}