Bug 1106448 - Make sure we have a frame in GetCurrentFrameRef. r=tn
authorSeth Fowler <seth@mozilla.com>
Wed, 03 Dec 2014 10:02:19 -0800
changeset 218296 5f0fc1b9b9664a8c3ccdf48b811d4bfb2acfa746
parent 218295 fa8fee882ed9859106180bddd5e37071a50e8f4f
child 218297 731184e5ebbd17ce711bd2356f41b6fd5b098d65
push id52504
push usermfowler@mozilla.com
push dateWed, 03 Dec 2014 18:02:31 +0000
treeherdermozilla-inbound@5f0fc1b9b966 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn
bugs1106448
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1106448 - Make sure we have a frame in GetCurrentFrameRef. r=tn
image/src/Decoder.h
--- a/image/src/Decoder.h
+++ b/image/src/Decoder.h
@@ -189,17 +189,18 @@ public:
   already_AddRefed<imgFrame> GetCurrentFrame()
   {
     nsRefPtr<imgFrame> frame = mCurrentFrame.get();
     return frame.forget();
   }
 
   RawAccessFrameRef GetCurrentFrameRef()
   {
-    return mCurrentFrame->RawAccessRef();
+    return mCurrentFrame ? mCurrentFrame->RawAccessRef()
+                         : RawAccessFrameRef();
   }
 
 protected:
   virtual ~Decoder();
 
   /*
    * Internal hooks. Decoder implementations may override these and
    * only these methods.