diff options
author | Mike Blumenkrantz <zmike@samsung.com> | 2019-05-29 09:31:33 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@samsung.com> | 2019-05-29 12:29:04 -0400 |
commit | 7b5fa23e9bee76531ec8f9ce6d17f06c9a18c3de (patch) | |
tree | 61533e6eee83b40daa2989a99b142195c6460e78 | |
parent | 05e70b25d51a264e0c34265040520eaf35831bb5 (diff) | |
download | efl-7b5fa23e9bee76531ec8f9ce6d17f06c9a18c3de.tar.gz |
emotion: don't update crop clipper geometry if crop clipper doesn't exist
Summary:
this object does not exist if no image border is set
@fix
Depends on D9002
Reviewers: cedric
Reviewed By: cedric
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9003
-rw-r--r-- | src/lib/emotion/emotion_smart.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c index e2243c818d..d733e41029 100644 --- a/src/lib/emotion/emotion_smart.c +++ b/src/lib/emotion/emotion_smart.c @@ -204,12 +204,12 @@ _clipper_position_size_update(Evas_Object *obj, int x, int y, int w, int h, int evas_object_image_fill_set(sd->obj, 0, 0, 0, 0); evas_object_move(sd->obj, x, y); evas_object_resize(sd->obj, 0, 0); + if (!sd->crop.clipper) return; evas_object_move(sd->crop.clipper, x, y); evas_object_resize(sd->crop.clipper, 0, 0); } else { - evas_object_move(sd->crop.clipper, x, y); scale_w = (double)w / (double)(vid_w - sd->crop.l - sd->crop.r); scale_h = (double)h / (double)(vid_h - sd->crop.t - sd->crop.b); @@ -219,6 +219,8 @@ _clipper_position_size_update(Evas_Object *obj, int x, int y, int w, int h, int evas_object_image_fill_set(sd->obj, 0, 0, sd->fill.w * w, sd->fill.h * h); evas_object_resize(sd->obj, vid_w * scale_w, vid_h * scale_h); evas_object_move(sd->obj, x - sd->crop.l * scale_w, y - sd->crop.t * scale_h); + if (!sd->crop.clipper) return; + evas_object_move(sd->crop.clipper, x, y); evas_object_resize(sd->crop.clipper, w, h); } } |