Efl.Canvas.Object.Animation: Prevent crash when called .animation_pause_set.

Summary:
When call efl_canvas_object_animation_animation_pause_set,
pd->in is freed by calling efl_canvas_object_animation_stop in _animator_cb.
So when set pause_state, crash occurred
This patch add null check to prevent null access.

Test Plan: N/A

Reviewers: Hermet, kimcinoo, herb, bu5hm4n

Reviewed By: Hermet, bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11815
This commit is contained in:
junsu choi 2020-05-12 23:08:30 +09:00 committed by Hermet Park
parent 789900d49a
commit 6196311ad7
1 changed files with 1 additions and 1 deletions

View File

@ -148,7 +148,7 @@ _efl_canvas_object_animation_animation_pause_set(Eo *obj, Efl_Canvas_Object_Anim
_end(obj, pd);
else
_start(obj, pd,(pd->in->speed < 0) ? 1.0 - pd->in->progress : pd->in->progress);
pd->in->pause_state = pause;
if (pd->in) pd->in->pause_state = pause;
}
EOLIAN static Eina_Bool