Skip to content

Commit

Permalink
fix(anim) return the first anim if exec_cb is NULL in lv_anim_get()
Browse files Browse the repository at this point in the history
Accprdign to the docs it should have worked like this.
Related to #2535
  • Loading branch information
kisvegabor committed Sep 15, 2021
1 parent 192419e commit fb7ea10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/misc/lv_anim.c
Expand Up @@ -151,7 +151,7 @@ lv_anim_t * lv_anim_get(void * var, lv_anim_exec_xcb_t exec_cb)
{
lv_anim_t * a;
_LV_LL_READ(&LV_GC_ROOT(_lv_anim_ll), a) {
if(a->var == var && a->exec_cb == exec_cb) {
if(a->var == var && (a->exec_cb == exec_cb || exec_cb == NULL)) {
return a;
}
}
Expand Down

0 comments on commit fb7ea10

Please sign in to comment.