Bug 1308090, r=jrmuizel a=ritu FIREFOX_50_0b8_BUILD1 FIREFOX_50_0b8_RELEASE
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Thu, 06 Oct 2016 15:59:15 +0100
changeset 350707 b7adb2f10487f6f886e047670ba720a248edcb44
parent 350706 7685b4f9ab3f70a0bbd7693a6df01c871fea9cd2
child 350708 62da552138459e86a7c25b1f2836e410454c5e5c
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel, ritu
bugs1308090
milestone50.0
Bug 1308090, r=jrmuizel a=ritu MozReview-Commit-ID: A0wlb1qtk9r
dom/canvas/ImageBitmap.cpp
--- a/dom/canvas/ImageBitmap.cpp
+++ b/dom/canvas/ImageBitmap.cpp
@@ -819,16 +819,20 @@ ImageBitmap::CreateInternal(nsIGlobalObj
 
   if (!container) {
     aRv.Throw(NS_ERROR_NOT_AVAILABLE);
     return nullptr;
   }
 
   AutoLockImage lockImage(container);
   layers::Image* data = lockImage.GetImage();
+  if (!data) {
+    aRv.Throw(NS_ERROR_NOT_AVAILABLE);
+    return nullptr;
+  }
   RefPtr<ImageBitmap> ret = new ImageBitmap(aGlobal, data);
 
   // Set the picture rectangle.
   if (ret && aCropRect.isSome()) {
     ret->SetPictureRect(aCropRect.ref(), aRv);
   }
 
   // Set mIsCroppingAreaOutSideOfSourceImage.