Bug 666312. Check surface status instead of surface existance. r=mwoodrow

We always have cairo surfaces now instead of having NULL ones. We should
check the status instead. This fixes crashes with the quartz and skia
azure backends.
This commit is contained in:
Jeff Muizelaar 2011-11-19 01:39:14 +13:00
parent 269d23bf72
commit 394e1a656b

View File

@ -3650,8 +3650,8 @@ nsCanvasRenderingContext2DAzure::DrawImage(nsIDOMElement *imgElt, float a1,
return res.mIsStillLoading ? NS_OK : NS_ERROR_NOT_AVAILABLE;
}
// Ignore nsnull cairo surfaces! See bug 666312.
if (!res.mSurface->CairoSurface()) {
// Ignore cairo surfaces that are bad! See bug 666312.
if (res.mSurface->CairoStatus()) {
return NS_OK;
}