elementary image: don't calc size using empty ones.

Summary:
Zero-sized image occasionally happens.
That occurs insane img/clipper region.

bj size => (w, h) then resize => (0, 0)
file_set(xx.jpg) then file_set (NULL)

Because of this, region could be flickered during prev/cur preloading images.

@fix

Reviewers: #committers, zmike

Subscribers: #reviewers, cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6725
This commit is contained in:
Hermet Park 2018-08-08 15:52:37 +09:00
parent 49d64e1f1a
commit c4ff2cde25
1 changed files with 9 additions and 0 deletions

View File

@ -182,6 +182,15 @@ _image_sizing_eval(Efl_Ui_Image_Data *sd, Evas_Object *img)
//1. Get the original image size (iw x ih)
evas_object_image_size_get(img, &iw, &ih);
//Exception Case
if ((iw == 0) || (ih == 0) || (sd->img_w == 0) || (sd->img_h == 0))
{
evas_object_resize(img, 0, 0);
evas_object_resize(sd->hit_rect, 0, 0);
return;
}
iw = ((double)iw) * sd->scale;
ih = ((double)ih) * sd->scale;