summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2008-05-28 11:53:40 -0400
committerRay Strode <rstrode@redhat.com>2008-05-28 11:53:40 -0400
commit7952221f065fe4c6e5177a66eaf4bfe46255413a (patch)
tree5a7a56225e8cac7549468aa79c76f408fc86142e /src
parent0e3d2824d29b469a977ed8780336c05f92e84921 (diff)
downloadplymouth-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.c4
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);