Fixed a possible divide by 0.

SVN revision: 2515
This commit is contained in:
Michael Jennings 2000-04-22 03:45:46 +00:00
parent c58aa765c0
commit bc4976e023
1 changed files with 7 additions and 4 deletions

View File

@ -577,10 +577,13 @@ __imlib_ScaleAARGBA(DATA32 **ypoints, int *xpoints, DATA32 *dest,
count += i;
ssptr += sow;
}
R_VAL(dptr) = r / count;
G_VAL(dptr) = g / count;
B_VAL(dptr) = b / count;
A_VAL(dptr) = a / count;
if (count)
{
R_VAL(dptr) = r / count;
G_VAL(dptr) = g / count;
B_VAL(dptr) = b / count;
A_VAL(dptr) = a / count;
}
dptr++;
}
else