Bug 1367376: Check for null. r?eitan draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Sat, 27 May 2017 00:08:40 +0200
changeset 585467 6da6fdf269e9c114d30859aaec936da879539af0
parent 585451 d1f3b396d684bf9b15d786d25d7722481cf42ac2
child 588739 ab5d8e8181a4b54815ffcb7ef744bd9d26e36eb3
push id61119
push userbmo:jyavenard@mozilla.com
push dateFri, 26 May 2017 22:09:11 +0000
reviewerseitan
bugs1367376
milestone55.0a1
Bug 1367376: Check for null. r?eitan MozReview-Commit-ID: LjLW4VJk4vh
dom/media/webspeech/synth/nsSpeechTask.cpp
--- a/dom/media/webspeech/synth/nsSpeechTask.cpp
+++ b/dom/media/webspeech/synth/nsSpeechTask.cpp
@@ -778,15 +778,15 @@ nsSpeechTask::WindowAudioCaptureChanged(
 }
 
 void
 nsSpeechTask::SetAudioOutputVolume(float aVolume)
 {
   if (mStream && !mStream->IsDestroyed()) {
     mStream->SetAudioOutputVolume(this, aVolume);
   }
-  if (mIndirectAudio) {
+  if (mIndirectAudio && mCallback) {
     mCallback->OnVolumeChanged(aVolume);
   }
 }
 
 } // namespace dom
 } // namespace mozilla