diff options
| author | Ray Strode <rstrode@redhat.com> | 2008-05-28 11:53:40 -0400 |
|---|---|---|
| committer | Ray Strode <rstrode@redhat.com> | 2008-05-28 11:53:40 -0400 |
| commit | 7952221f065fe4c6e5177a66eaf4bfe46255413a (patch) | |
| tree | 5a7a56225e8cac7549468aa79c76f408fc86142e /src | |
| parent | 0e3d2824d29b469a977ed8780336c05f92e84921 (diff) | |
| download | plymouth-7952221f065fe4c6e5177a66eaf4bfe46255413a.tar.gz plymouth-7952221f065fe4c6e5177a66eaf4bfe46255413a.tar.xz plymouth-7952221f065fe4c6e5177a66eaf4bfe46255413a.zip | |
If no frames could be loaded for the throbber, noop instead of crash
Diffstat (limited to 'src')
| -rw-r--r-- | src/splash-plugins/spinfinity/throbber.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/splash-plugins/spinfinity/throbber.c b/src/splash-plugins/spinfinity/throbber.c index 868a5ee..3d5f7a5 100644 --- a/src/splash-plugins/spinfinity/throbber.c +++ b/src/splash-plugins/spinfinity/throbber.c @@ -130,6 +130,10 @@ animate_at_time (throbber_t *throbber, uint32_t *frame_data; number_of_frames = ply_array_get_size (throbber->frames); + + if (number_of_frames == 0) + return; + frame_number = (.5 * sin (time) + .5) * number_of_frames; ply_frame_buffer_pause_updates (throbber->frame_buffer); |
