Page MenuHomePhabricator

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

Authored by jsuya on May 12 2020, 5:13 AM.

Details

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

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jsuya created this revision.May 12 2020, 5:13 AM
jsuya requested review of this revision.May 12 2020, 5:13 AM
bu5hm4n requested changes to this revision.May 12 2020, 5:48 AM
bu5hm4n added a subscriber: bu5hm4n.

I think you can just equip this with a if (pd->in), instead of moving it. The pause state will anyways be dropped when it is stopped, so this does not matter anymore. Additionally, I think it is usefull to have pause still beeing false during the first animation tick after the pausing stopped.

This revision now requires changes to proceed.May 12 2020, 5:48 AM
jsuya updated this revision to Diff 30227.May 12 2020, 6:01 AM

I updated code. thanks

jsuya updated this revision to Diff 30228.May 12 2020, 6:03 AM
jsuya edited the summary of this revision. (Show Details)

update comments

bu5hm4n accepted this revision.May 12 2020, 6:12 AM

Thank you :)

This revision is now accepted and ready to land.May 12 2020, 6:12 AM
Hermet accepted this revision.May 12 2020, 7:07 AM
This revision was automatically updated to reflect the committed changes.