Bug 1195098. Null check for blurred source surface. r=mstange a=ritu
authorMason Chang <mchang@mozilla.com>
Tue, 18 Aug 2015 20:43:24 -0700
changeset 288803 9a2f4afc22b38c7277b8dcf5ee6a4643da43cf9e
parent 288802 2867fa5b43d6bc4976a3bbf966c2c16dc6ffbd37
child 288804 534e581941ea8886c08068a943d81fbbc61bf20d
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange, ritu
bugs1195098
milestone42.0a2
Bug 1195098. Null check for blurred source surface. r=mstange a=ritu
gfx/thebes/gfxBlur.cpp
--- a/gfx/thebes/gfxBlur.cpp
+++ b/gfx/thebes/gfxBlur.cpp
@@ -411,16 +411,19 @@ CreateBlurMask(const IntSize& aRectSize,
       MakePathForRoundedRect(*blurDT, Rect(minRect), *aCornerRadii);
     blurDT->Fill(roundedRect, black);
   } else {
     blurDT->FillRect(Rect(minRect), black);
   }
 
   IntPoint topLeft;
   RefPtr<SourceSurface> result = blur.DoBlur(&aDestDrawTarget, &topLeft);
+  if (!result) {
+    return nullptr;
+  }
 
   IntRect expandedMinRect(topLeft, result->GetSize());
   aExtendDestBy = expandedMinRect - minRect;
   aSliceBorder = slice + aExtendDestBy;
 
   MOZ_ASSERT(aSliceBorder.LeftRight() <= expandedMinRect.width);
   MOZ_ASSERT(aSliceBorder.TopBottom() <= expandedMinRect.height);