Fix ethumb_calculate_fill_from_ratio().

Default values should be assigned to the return variables even if the
aspect ratio is 0.



SVN revision: 43352
This commit is contained in:
Rafael Antognolli 2009-10-30 14:30:15 +00:00
parent 765e981041
commit 0db1dc430b
1 changed files with 4 additions and 3 deletions

View File

@ -1000,13 +1000,14 @@ ethumb_calculate_fill_from_ratio(Ethumb *e, float ia, int *fx, int *fy, int *fw,
{
float a;
if (ia == 0)
return;
*fw = e->tw;
*fh = e->th;
*fx = 0;
*fy = 0;
if (ia == 0)
return;
a = e->tw / (float)e->th;
if (e->aspect == ETHUMB_THUMB_CROP)