zmike pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7b5fa23e9bee76531ec8f9ce6d17f06c9a18c3de

commit 7b5fa23e9bee76531ec8f9ce6d17f06c9a18c3de
Author: Mike Blumenkrantz <[email protected]>
Date:   Wed May 29 09:31:33 2019 -0400

    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
---
 src/lib/emotion/emotion_smart.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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);
      }
 }

-- 


Reply via email to