mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 1279348: Avoid division by 0. r=kentuckyfriedtakahe
MozReview-Commit-ID: DSwB3J9jADK --HG-- extra : rebase_source : 147ba3e98d203ffcf7b477e2b38c63b1286fa881
This commit is contained in:
parent
35d4852105
commit
aa40888631
@ -261,7 +261,8 @@ public:
|
||||
// container.
|
||||
nsIntRect ScaledImageRect(int64_t aWidth, int64_t aHeight) const
|
||||
{
|
||||
if (aWidth == mImage.width && aHeight == mImage.height) {
|
||||
if ((aWidth == mImage.width && aHeight == mImage.height) ||
|
||||
!mImage.width || !mImage.height) {
|
||||
return ImageRect();
|
||||
}
|
||||
nsIntRect imageRect = ImageRect();
|
||||
|
Loading…
Reference in New Issue
Block a user