From a123bbbf99e2171424d9822a4dbf356a4ba58eeb Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Tue, 26 Feb 2013 09:51:59 +0100 Subject: [PATCH] Bug 844563 - Crash [@ mozilla::MediaDecoder::SetPreservesPitch]. r=kinetik --- content/html/content/src/nsHTMLMediaElement.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/html/content/src/nsHTMLMediaElement.cpp b/content/html/content/src/nsHTMLMediaElement.cpp index 1551722a41e..aff18cf2535 100644 --- a/content/html/content/src/nsHTMLMediaElement.cpp +++ b/content/html/content/src/nsHTMLMediaElement.cpp @@ -3581,7 +3581,9 @@ NS_IMETHODIMP nsHTMLMediaElement::GetMozPreservesPitch(bool* aPreservesPitch) NS_IMETHODIMP nsHTMLMediaElement::SetMozPreservesPitch(bool aPreservesPitch) { mPreservesPitch = aPreservesPitch; - mDecoder->SetPreservesPitch(aPreservesPitch); + if (mDecoder) { + mDecoder->SetPreservesPitch(mPreservesPitch); + } return NS_OK; }