Bug 1067311 - Don't crash if a gfxSurfaceDrawable failed to allocate a SourceSurface. r=Bas

This commit is contained in:
Matt Woodrow 2014-09-22 16:49:40 -04:00
parent 76cce7aac2
commit c40f74b45f

View File

@ -34,6 +34,10 @@ gfxSurfaceDrawable::DrawWithSamplingRect(gfxContext* aContext,
const GraphicsFilter& aFilter,
gfxFloat aOpacity)
{
if (!mSourceSurface) {
return true;
}
// When drawing with CLAMP we can expand the sampling rect to the nearest pixel
// without changing the result.
gfxRect samplingRect = aSamplingRect;