mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 506063. Add rect emptiness check to imgContainer::ExtractCurrentFrame(). r=vlad
--HG-- extra : rebase_source : 958125394452e818ea3a797e0848ac04373a7080
This commit is contained in:
parent
c25a84f164
commit
948c8755b3
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user