Commit 6ca8b072 authored by Sergey Ulanov's avatar Sergey Ulanov Committed by Commit Bot

[Fuchsia] Fix crash in FuchsiaDecryptor

FuchsiaDecryptor::CancelDecrypt() was trying to use |audio_decryptor_|
even if it wasn't created.

Bug: b/141148085
Change-Id: Ib015ba1739cb5b57a5b4174d2732e5ccc3568005
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1842114
Auto-Submit: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: default avatarYuchen Liu <yucliu@chromium.org>
Commit-Queue: Yuchen Liu <yucliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703068}
parent 8151b15c
...@@ -40,7 +40,7 @@ void FuchsiaDecryptor::Decrypt(StreamType stream_type, ...@@ -40,7 +40,7 @@ void FuchsiaDecryptor::Decrypt(StreamType stream_type,
} }
void FuchsiaDecryptor::CancelDecrypt(StreamType stream_type) { void FuchsiaDecryptor::CancelDecrypt(StreamType stream_type) {
if (stream_type == StreamType::kAudio) { if (stream_type == StreamType::kAudio && audio_decryptor_) {
audio_decryptor_->CancelDecrypt(); audio_decryptor_->CancelDecrypt();
} }
} }
......
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