animation: Verify internal state
Be more drastic if the internal state is broken, and assert() if the expected Alpha and Timeline instances we need are not valid. This usually implies a library bug or a massive heap corruption.
This commit is contained in:
parent
8daa3035e5
commit
7073e69b4e
@ -1244,6 +1244,8 @@ clutter_animation_set_mode (ClutterAnimation *animation,
|
||||
g_object_freeze_notify (G_OBJECT (animation));
|
||||
|
||||
alpha = clutter_animation_get_alpha_internal (animation);
|
||||
g_assert (CLUTTER_IS_ALPHA (alpha));
|
||||
|
||||
clutter_alpha_set_mode (alpha, mode);
|
||||
|
||||
g_object_notify (G_OBJECT (animation), "mode");
|
||||
@ -1297,6 +1299,8 @@ clutter_animation_set_duration (ClutterAnimation *animation,
|
||||
g_object_freeze_notify (G_OBJECT (animation));
|
||||
|
||||
timeline = clutter_animation_get_timeline_internal (animation);
|
||||
g_assert (CLUTTER_IS_TIMELINE (timeline));
|
||||
|
||||
clutter_timeline_set_duration (timeline, msecs);
|
||||
clutter_timeline_rewind (timeline);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user