Commit 78f33f72 authored by David Tseng's avatar David Tseng Committed by Commit Bot

Do not call StopSpeaking on TtsPlatform that is not available

R=dmazzoni@chromium.org

Fixed: 1113751
Change-Id: Ie7c04ab7b23b18ed6d980ed4b78fb6a756c59774
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2341402Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#795561}
parent 0394d571
...@@ -170,7 +170,7 @@ bool TtsControllerImpl::StopCurrentUtteranceIfMatches(const GURL& source_url) { ...@@ -170,7 +170,7 @@ bool TtsControllerImpl::StopCurrentUtteranceIfMatches(const GURL& source_url) {
if (current_utterance_ && !current_utterance_->GetEngineId().empty()) { if (current_utterance_ && !current_utterance_->GetEngineId().empty()) {
if (engine_delegate_) if (engine_delegate_)
engine_delegate_->Stop(current_utterance_.get()); engine_delegate_->Stop(current_utterance_.get());
} else { } else if (GetTtsPlatform()->PlatformImplAvailable()) {
GetTtsPlatform()->ClearError(); GetTtsPlatform()->ClearError();
GetTtsPlatform()->StopSpeaking(); GetTtsPlatform()->StopSpeaking();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment