mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
Fix error reported by @canardos in lv_imgbtn
This commit is contained in:
parent
2b67dcd2cf
commit
fabd551e2a
@ -81,11 +81,10 @@ lv_obj_t * lv_imgbtn_create(lv_obj_t * par, const lv_obj_t * copy)
|
|||||||
}
|
}
|
||||||
/*Copy an existing image button*/
|
/*Copy an existing image button*/
|
||||||
else {
|
else {
|
||||||
|
lv_imgbtn_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
|
||||||
#if LV_IMGBTN_TILED == 0
|
#if LV_IMGBTN_TILED == 0
|
||||||
memcpy(ext->img_src, copy_ext->img_src, sizeof(ext->img_src));
|
memcpy(ext->img_src, copy_ext->img_src, sizeof(ext->img_src));
|
||||||
#else
|
#else
|
||||||
lv_imgbtn_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
|
|
||||||
|
|
||||||
memcpy(ext->img_src_left, copy_ext->img_src_left, sizeof(ext->img_src_left));
|
memcpy(ext->img_src_left, copy_ext->img_src_left, sizeof(ext->img_src_left));
|
||||||
memcpy(ext->img_src_mid, copy_ext->img_src_mid, sizeof(ext->img_src_mid));
|
memcpy(ext->img_src_mid, copy_ext->img_src_mid, sizeof(ext->img_src_mid));
|
||||||
memcpy(ext->img_src_right, copy_ext->img_src_right, sizeof(ext->img_src_right));
|
memcpy(ext->img_src_right, copy_ext->img_src_right, sizeof(ext->img_src_right));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user