Bug 844563 - Crash [@ mozilla::MediaDecoder::SetPreservesPitch]. r=kinetik
authorPaul Adenot <paul@paul.cx>
Tue, 26 Feb 2013 09:51:59 +0100
changeset 122997 ff5e6cafae21394df9945e7c29beb4682198e281
parent 122996 07c685a14d5c27a5a33a921267be069a3b5c1260
child 122998 2d843af0b0c79fc68ba14c8e08c7b2776e0be33b
push id1387
push userphilringnalda@gmail.com
push dateTue, 26 Feb 2013 22:32:56 +0000
treeherderfx-team@ad4cc4e97774 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskinetik
bugs844563
milestone22.0a1
Bug 844563 - Crash [@ mozilla::MediaDecoder::SetPreservesPitch]. r=kinetik
content/html/content/src/nsHTMLMediaElement.cpp
--- a/content/html/content/src/nsHTMLMediaElement.cpp
+++ b/content/html/content/src/nsHTMLMediaElement.cpp
@@ -3576,17 +3576,19 @@ NS_IMETHODIMP nsHTMLMediaElement::GetMoz
 {
   *aPreservesPitch = mPreservesPitch;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsHTMLMediaElement::SetMozPreservesPitch(bool aPreservesPitch)
 {
   mPreservesPitch = aPreservesPitch;
-  mDecoder->SetPreservesPitch(aPreservesPitch);
+  if (mDecoder) {
+    mDecoder->SetPreservesPitch(mPreservesPitch);
+  }
   return NS_OK;
 }
 
 ImageContainer* nsHTMLMediaElement::GetImageContainer()
 {
   VideoFrameContainer* container = GetVideoFrameContainer();
   return container ? container->GetImageContainer() : nullptr;
 }