Bug 506063. Add rect emptiness check to imgContainer::ExtractCurrentFrame(). r=vlad

--HG--
extra : rebase_source : 958125394452e818ea3a797e0848ac04373a7080
This commit is contained in:
Joe Drew 2009-08-05 14:39:05 +12:00
parent c25a84f164
commit 948c8755b3

View File

@ -153,6 +153,9 @@ NS_IMETHODIMP imgContainer::ExtractCurrentFrame(const nsIntRect &aRegion, imgICo
nsIntRect framerect = frame->GetRect();
framerect.IntersectRect(framerect, aRegion);
if (framerect.IsEmpty())
return NS_ERROR_NOT_AVAILABLE;
nsAutoPtr<imgFrame> subframe;
nsresult rv = frame->Extract(framerect, getter_Transfers(subframe));
if (NS_FAILED(rv))