Bug 781731 - Fixed crash caused by an empty shadow region; r=Bas

This commit is contained in:
Anthony Jones 2012-08-27 11:35:10 +02:00
parent cd3e2d436b
commit 1257ef6e3e

View File

@ -306,6 +306,13 @@ public:
mTempRect = mTempRect.Intersect(*aBounds);
}
// Nothing to draw
if (mTempRect.IsEmpty()) {
mTarget = ctx->mTarget;
mCtx = nullptr;
return;
}
mTempRect.ScaleRoundOut(1.0f);
transform._31 -= mTempRect.x;
@ -313,7 +320,7 @@ public:
mTarget =
mCtx->mTarget->CreateShadowDrawTarget(IntSize(int32_t(mTempRect.width), int32_t(mTempRect.height)),
FORMAT_B8G8R8A8, mSigma);
FORMAT_B8G8R8A8, mSigma);
if (!mTarget) {
// XXX - Deal with the situation where our temp size is too big to